-
Notifications
You must be signed in to change notification settings - Fork 1k
Upgrade :esbuild to minimum version when upgrading to 1.1 #4011
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, there is a small issue.
Usually, in a freshly generated Phoenix project, we have a line for
:esbuild
like below inmix.exs
for the dependencies:Why
quote
?quote
is used so that it generatesruntime: Mix.env() == :dev
. Without it, it would generate something likeruntime: false
.Consequence of using
quote
At the upgrade confirmation, it prints an AST instead of
Mix.env() == :dev
:This might not be so clear for the user...
Alternative to
quote
An alternative would be to just add a raw value
runtime: :dev
, it would look like this:But this would then upgrade AND update the value for
:runtime
, which might not be ideal, because we just need to upgrade the version without touching the test.I would need some guidance on this one, because both has some drawbacks. I have chosen the one that has an unclear message, but without modifying something that we should not.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Ash team me proposed two alternatives to solve this solutions:
:yes?
toadd_dep
, so that "Desired" and "Found" are not shown and the upgrade is directly done. (discord answer)set_dep_option/4
(discord answer)I have chosen solution 2. so that it is clearer what the changes are going to happen.
Here the printed result when solution 2. is used:
The AST is not printed anymore and the versions are shown correctly. A small drawback is that it is not exactly like what is written in
mix.exs
, becauseruntime: Mix.env() == :dev
is missing.If this solution is not fine for you, I will make changes for solution 1.
Thanks for the Ash team for their support.
Related issue on Igniter: ash-project/igniter#338