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

cue: Updating cue.All() to set the hasHidden flag to true #3771

Open
lorrrrrrrenzo opened this issue Feb 19, 2025 · 0 comments
Open

cue: Updating cue.All() to set the hasHidden flag to true #3771

lorrrrrrrenzo opened this issue Feb 19, 2025 · 0 comments
Labels
NeedsInvestigation Triage Requires triage/attention

Comments

@lorrrrrrrenzo
Copy link

What version of CUE are you using (cue version)?

$ cue version

cue version v0.12.0

go version go1.23.5
      -buildmode exe
       -compiler gc
       -trimpath true
  DefaultGODEBUG asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1
     CGO_ENABLED 1
          GOARCH arm64
            GOOS darwin
         GOARM64 v8.0
cue.lang.version v0.12.0

Does this issue reproduce with the latest stable release?

Yes.

What did you do?

When comparing the behavior of cue.All() to other alternatives for configuring cue.Option in an attempt to reduce redundancy, I noticed that cue.All() might logically intend to include hidden fields and/or documentation, adopting the behavior of cue.Hidden(true) and cue.Docs(true) respectively. Using cue.All() almost exactly mimics the use of cue.Hidden(true), except the former does not set the hasHidden flag to true. We see something similar with cue.Docs(true), but I'm less sure that setting that flag, docs, is desirable behavior.

What did you expect to see?

For my use of cue.All() to not necessitate the use of cue.Hidden(true) as well.

What did you see instead?

The need to use cue.Hidden(true) as well.


Happy to open a pull request.

@lorrrrrrrenzo lorrrrrrrenzo added NeedsInvestigation Triage Requires triage/attention labels Feb 19, 2025
@lorrrrrrrenzo lorrrrrrrenzo changed the title Updating cue.All() to set the hasHidden flag to true cue: Updating cue.All() to set the hasHidden flag to true Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Triage Requires triage/attention
Projects
None yet
Development

No branches or pull requests

1 participant