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

cmd/cue: qualifiers could include "auto:" to opt back in to filename suffix inferences #3501

Open
jpluscplusm opened this issue Oct 11, 2024 · 0 comments
Labels
FeatureRequest New feature or request Triage Requires triage/attention

Comments

@jpluscplusm
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

In https://cuelang.org/docs/concept/using-the-cue-export-command/inputs/#input-file-encodings we documented that:

There is no way for the [cue export] invocation to re-engage the interpretation of filename suffixes

Meaning that, in invocations such as cue export json: file1 yaml: file2 json: file3.json yaml: file4.yaml, there's no way for the user to say "I need to specify the encoding of file1 and file2, as they're suffix-less, but all the files following them could have their encoding inferred from their filename suffix".

Describe the solution you'd like

In https://cuelang.org/cl/1197464/comment/ed38f30b_df73516e/, @mvdan asked:

Would it make sense to allow cue export auto: foo.yaml as an alias to cue export foo.yaml? We already have a notion of "auto" for build.Interpretation, and there's a default "auto" filetype, even though it appears to not be exposed to the CLI:

auto: interpretations.auto & {
     encoding: *"json" | string
} 

Describe alternatives you've considered

  • Rearranging the order of input arguments (not always possible/ideal)
  • Manually specifying the qualifiers for all files

Additional context

@jpluscplusm jpluscplusm added FeatureRequest New feature or request Triage Requires triage/attention labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request Triage Requires triage/attention
Projects
None yet
Development

No branches or pull requests

1 participant