-
Notifications
You must be signed in to change notification settings - Fork 386
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
Emit notice when unnecessary feature flags are used #3641
Comments
I like the idea; it doesn't seem that difficult to implement either. we have Lines 193 to 196 in c48f19f
which parses the initial then the corresponding parts that sets the bools to true: Lines 256 to 266 in c48f19f
all we would have to do is check to see if these bools are already true and raise a warning if they are. the naive approach would be to do, for example:
but that seems rather tedious (and error-prone) and should be avoided if possible -- maybe we can use |
we have a lot of open issues at the moment (and we're trying to stay focused on bug fixes) -- no promise on a timeline for us to get to it, but PRs for this would be most welcomed. |
@alexcb , hi I would like to work on this issue, could u assign it to me? |
@danqixu this is still an open issue -- go for it. However I unfortunately can't offer much support with this task due to competing priorities. |
What existing functionality needs improvement?
I've found Earthly's feature flags to be a useful way to try out experimental features. However, over time my Earthfile's
VERSION
line became cluttered with feature flags. At some point, I looked at the documentation again, and realized that most of the flags I had been using were no longer necessary, as the features had been accepted and integrated into the release as non-experimental features. I was thinking that it would be nice if Earthly notified the user if their Earthfile has feature flags that are no longer necessary.EXAMPLE:
Let's say I have an Earthfile like:
The feature corresponding to
--use-copy-link
was accepted for 0.7, and so the--use-copy-link
flag is unnecessary in this example Earthfile.Expected Behavior
Upon invocation, Earthly would emit a notice to the user, informing them that the feature flag is unnecessary. This message would be informational only, and would not affect Earthly's execution otherwise.
Using the note about
COMMAND
being renamed toFUNCTION
in 0.8 as an example, this message might appear in the output like so:The text was updated successfully, but these errors were encountered: