Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

cmd/cue: make it possible for import to operate on standard input #116

Closed
rogpeppe opened this issue Sep 24, 2019 · 1 comment
Closed

cmd/cue: make it possible for import to operate on standard input #116

rogpeppe opened this issue Sep 24, 2019 · 1 comment
Labels
FeatureRequest New feature or request good first issue Good for newcomers roadmap/cli Specific tag for roadmap issue #337
Milestone

Comments

@rogpeppe
Copy link
Contributor

Currently, it's possible to ask cue import to produce the result to the standard output, but there's no way to tell it to read from standard input.

It's not possible to do cue import /dev/stdin because /dev/stdin doesn't have a file extension.

As a corollary to this, it would be nice to be able to import files that don't have the conventional file extension, particularly when specifying the file names directly on the command line.

Perhaps a -ext json flag ("treat all files as if their extension was JSON") might work, or perhaps --force-type (-F for short?) ("treat all files as if their extension is as declared by the -type flag").

@mpvl mpvl added FeatureRequest New feature or request good first issue Good for newcomers labels Sep 24, 2019
@mpvl mpvl added the roadmap/cli Specific tag for roadmap issue #337 label Dec 1, 2019
@mpvl mpvl added this to the v0.0.16 - cli boost milestone Dec 5, 2019
mpvl added a commit that referenced this issue Feb 17, 2020
The idea is that the build.File type will be added
to the build.Instance type, replacing the current
file specs. It will be populated by the load package.

The command line tool can subsequently use this
package to determine settings on how to interpret
build.File. It is a separate internal package so that
the API can be shared by load and cmd.

Issue #280
Issue #254
Issue #183
Issue #130
Issue #116

Change-Id: I47f2391945113fe664f0ec33b0048be70326edb5
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4946
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
@mpvl mpvl closed this as completed in 485f389 Mar 7, 2020
mpvl added a commit that referenced this issue Mar 10, 2020
Closes #280
Issue #190
Issue #130
Issue #116
Issue #91

Change-Id: I1d5cf2018cdd8be2625313e302cee4087b48f6f7
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5160
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
@myitcv myitcv modified the milestones: v0.0.16 - cli boost, v0.1.0 Apr 9, 2020
@cueckoo
Copy link

cueckoo commented Jul 3, 2021

This issue has been migrated to cue-lang/cue#116.

For more details about CUE's migration to a new home, please see cue-lang/cue#1078.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest New feature or request good first issue Good for newcomers roadmap/cli Specific tag for roadmap issue #337
Projects
None yet
Development

No branches or pull requests

4 participants