Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: resolve project app names set using a module attribute #111

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zachallaun
Copy link
Contributor

This PR also fixes two bugs in Common.expand_literal/1. Previously, the following would be returned:

iex(1)> ":foo" |> Sourceror.parse_string!() |> Sourceror.Zipper.zip() |> Igniter.Code.Common.expand_literal()
{:ok, {:__block__, [trailing_comments: [], leading_comments: [], line: 1, column: 1], [:foo]}}
iex(2)> "@foo" |> Sourceror.parse_string!() |> Sourceror.Zipper.zip() |> Igniter.Code.Common.expand_literal()
{:ok,
 {:@, [trailing_comments: [], leading_comments: [], line: 1, column: 1],
  [{:foo, [trailing_comments: [], leading_comments: [], line: 1, column: 2], nil}]}}

With this PR:

iex(1)> ":foo" |> Sourceror.parse_string!() |> Sourceror.Zipper.zip() |> Igniter.Code.Common.expand_literal()
{:ok, :foo}
iex(2)> "@foo" |> Sourceror.parse_string!() |> Sourceror.Zipper.zip() |> Igniter.Code.Common.expand_literal()
:error

Contributor checklist

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

@zachdaniel
Copy link
Contributor

Looking great. One small question added. Also curious if you'd rather get the other one in before this.

@zachdaniel
Copy link
Contributor

We can ignore the CI issue, that is a misconfiguration in our CI that I need to address.

@zachallaun zachallaun marked this pull request as draft October 26, 2024 21:13
@zachallaun
Copy link
Contributor Author

zachallaun commented Oct 26, 2024

Marked as a draft for now because this PR now relies on #113, which hasn't been merged yet, so tests are now failing. Once it's merged, I'll rebase and mark as ready for review.

Edit: Done 🙂

@zachallaun zachallaun marked this pull request as ready for review October 26, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants