Replies: 5 comments 12 replies
-
Yes, a library can specify inputs as well. The tool is responsible for presenting them all to the user, and clarifying which input goes where.
Yes unless we find a specific technical reason why it can’t.
Yes. |
Beta Was this translation helpful? Give feedback.
-
What’s the nature of the upstream work needed? |
Beta Was this translation helpful? Give feedback.
-
At first glace, here’s how I feel about each option. Not a definitive answer! No:
Maybe:
|
Beta Was this translation helpful? Give feedback.
-
To bring back concepts from the first dagger mockups: instead of inputs and outputs, we should use terminology that clarifies that these fields are user-facing. Any non-concrete field in a dagger config is technically either an input (if its value contains no reference) or an output (if its value contains a reference). These inputs and outputs could be detected without additional annotation. But not all of them are meant to be presented to the user. To identify those user-facing fields is what requires annotations. So really these annotations are presentation metadata: what UI widget do we use to render this field to the user? Possible types include: text label, test field, checkbox, dropdown select, multi-select.. This could be explicit in an attribute, or inferred. The widgets are bundled together in control panels. Perhaps there are 2 standardized panel:
To be continued :) |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
We propose using CUE Attributes to mark Dagger concepts. Attributes are designed for tools building on CUE. They are not part of evaluation and can provided metadata for tool authors and users.
Attributes being considered:
@input()
- inputs to modules and libraries@output()
- outputs from modules and libraries@widget()
- metadata for presentation in UI / CLI@compute()
- replace#compute
as the required definition@artifact()
- replacedagger.#Artifact
as a required definition@debug()
- futurology for BuildKit drop in debug sessionsexecution.
Motivation
The initial motivation was for marking inputs. Currently, if a user forgets to set an input, they do not find out until late in Daggers execution, at the point they are used. We would like to be able to detect missing inputs early (before BuildKit) and error, alerting to the user as such.
Types of inputs:
The broader motivation is to solidify the UX / DX for both users and library authors, as well as create a means to auto-generate presentation and other interfaces in the UI / CLI.
Implementation
CUE attributes will be used to mark Dagger concepts. We may be able to encode metadata (extra data needed by Dagger to process fields with attributes) using disjunctions and definitions (TBD).
A first implementation will likely focus on inputs, outputs, widgets, and presentation.
Questions:
dagger input ...
) and adhoc (dagger compute --input-* ...
) input values?(alternative implementations were considered, they can be found in the edit history of this textarea. Several were discarded for UX, this proposal is trying to merge the remaining 2)
Terms
User eXperience (UX):
Developer eXperience (DX):
Other questions:
Do outputs deserve some treatment as well? (would a user or developer like to know what is returned) (yes)
Related CUE issues, discussions, and CLs
Beta Was this translation helpful? Give feedback.
All reactions