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

The --no-default-features cli parameter was altered in 0.21.0-alpha.2 #803

Closed
gzp79 opened this issue May 29, 2024 · 3 comments · Fixed by #807
Closed

The --no-default-features cli parameter was altered in 0.21.0-alpha.2 #803

gzp79 opened this issue May 29, 2024 · 3 comments · Fixed by #807
Labels
needs design This item needs design work

Comments

@gzp79
Copy link

gzp79 commented May 29, 2024

One of my github action stopped working with the latest trunk version:

version: Installed trunk 0.21.0-alpha.2.
command: trunk build --no-default-features --features design --release -d dist/release
output:

error: a value is required for '--no-default-features <NO_DEFAULT_FEATURES>' but none was supplied
  [possible values: true, false]

expected behavior: it works as before

Is this change intentional ?

@ctron
Copy link
Collaborator

ctron commented May 29, 2024

Is this change intentional ?

Nope, thanks for reporting it.

@ctron ctron added the needs design This item needs design work label May 29, 2024
@ctron
Copy link
Collaborator

ctron commented May 29, 2024

Related to #780

The cause for this is that the argument now is Option<bool>, and the user can (must) provide a value, which is then used to override.

In versions of 0.20.x and before, that was only a bool, and the user was not able to override the value with false.

I think it would make sense to enable the following, if possible:

--no-default-features # -> Some(true)
--no-default-features true # -> Some(true)
--no-default-features false # -> Some(false)

The same is true for some other boolean style values.

ctron added a commit to ctron/trunk that referenced this issue Jun 3, 2024
* Add env-var variants for the build command arguments
* For boolean flags, allow non-value variant
* Other minor cleanups

Closes trunk-rs#803
ctron added a commit to ctron/trunk that referenced this issue Jun 3, 2024
* Add env-var variants for the build command arguments
* For boolean flags, allow non-value variant
* Other minor cleanups

Closes trunk-rs#803
@ctron ctron closed this as completed in #807 Jun 3, 2024
ctron added a commit that referenced this issue Jun 3, 2024
* Add env-var variants for the build command arguments
* For boolean flags, allow non-value variant
* Other minor cleanups

Closes #803
@ctron
Copy link
Collaborator

ctron commented Jun 3, 2024

@gzp79 The fix was released with 0.21.0-alpha.3. Maybe you can give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs design This item needs design work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants