You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If I create a command in a _tool.cue file in one CUE package, I currently can't import and use that same command in another CUE package.
Describe the solution you'd like
I'd like to be able to use commands defined in _tool.cue files in more than one package.
For example, if I define an ls command in package foo, I'd like to be able to import and use the same ls command in package bar.
Describe alternatives you've considered
I've considered copying and pasting useful commands, but that's not DRY, and it's prone to command implementations "drifting" across packages.
The main problem to avoid is importing the tooling layer into the hermetic layer through a series of imports. This seems doable with enough bookkeeping & checks.
The text was updated successfully, but these errors were encountered:
Note, you can define tasks with the $id field set correctly, without the tools/ import lines when defining. Put these in regular CUE files and you can then import them.
We plan to deprecate cue cmd and have cue run/cuerun instead, and doing some things better. One of the ideas here is to get rid of the special treatment of _tool.cue, which would make this all a lot easier.
In the end, as Tony alludes to, tool definitions are just CUE values that are interpreted by the tooling layer, so there is actually really no reason to treat them differently.
Is your feature request related to a problem? Please describe.
If I create a command in a
_tool.cue
file in one CUE package, I currently can't import and use that same command in another CUE package.Describe the solution you'd like
I'd like to be able to use commands defined in
_tool.cue
files in more than one package.For example, if I define an
ls
command in packagefoo
, I'd like to be able to import and use the samels
command in packagebar
.Describe alternatives you've considered
I've considered copying and pasting useful commands, but that's not DRY, and it's prone to command implementations "drifting" across packages.
Additional context
This seems related to #851.
Also, a note from Tony Worm via Slack:
The text was updated successfully, but these errors were encountered: