Skip to content

Allow hidden tasks in cue/flow#1419

Closed
jlongtine wants to merge 2 commits into
cue-lang:masterfrom
jlongtine:jl/hidden-tasks
Closed

Allow hidden tasks in cue/flow#1419
jlongtine wants to merge 2 commits into
cue-lang:masterfrom
jlongtine:jl/hidden-tasks

Conversation

@jlongtine
Copy link
Copy Markdown
Contributor

@jlongtine jlongtine commented Dec 8, 2021

Allow hidden fields contain tasks would be very useful for us on the dagger team.

This PR adds a configuration field for cue/flow to enable hidden fields as tasks, and includes a small test.

Joel Longtine added 2 commits December 8, 2021 11:33
Signed-off-by: Joel Longtine <joel@longtine.io>
Signed-off-by: Joel Longtine <joel@longtine.io>
@verdverm
Copy link
Copy Markdown

verdverm commented Dec 8, 2021

Would it be better to allow setting or passing an options slice for full configurability? What if another user wants to find tasks in definitions or optional values?

It seems best to allow the options to be passed, which would be a stable API, should the options change or expand.

@jlongtine
Copy link
Copy Markdown
Contributor Author

@verdverm I'm not sure how that would play in this case.

These are the Options available:

The only Options that make sense to me in this context are Hidden and Definitions. Perhaps All?

Having a Optional, Attributes, or Docs task doesn't compute with my mental model of tasks. Am I missing something here?

@myitcv @mpvl Any thoughts?

@verdverm
Copy link
Copy Markdown

verdverm commented Jan 4, 2022

@jlongtine My thought is to have an Options []cue.Option{} on the config object, rather than making something specific to Hidden. This is more flexible (developer configurable), concise, and future proofs any new options that may be made available. This is the same idea I think should be applied to the Walk function (i.e. https://cuetorials.com/go-api/basics/traversing/#custom-walk) and generally areas where Fields is called internally.

RE: recent slack message, a few thoughts

  • A motivating example would be great to see
  • A common reply to PRs without issues is that changes typically start with a proposal. (which would include a motivating example and a discussion into the design choices, rather than in the PR)
  • Hidden fields are not visible across package imports, will this cause issue with your desired goals?

@myitcv myitcv requested a review from mpvl January 29, 2022 09:45
@myitcv myitcv added the Discuss Requires maintainer discussion label Jan 29, 2022
@myitcv
Copy link
Copy Markdown
Member

myitcv commented Feb 10, 2022

Closing because this is superseded by https://review.gerrithub.io/c/cue-lang/cue/+/532797

@myitcv myitcv closed this Feb 10, 2022
HelloWorld668 pushed a commit to HelloWorld668/cue that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Discuss Requires maintainer discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants