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

cue import --recursive does not work for embedded multi docs yaml stream #1209

Open
yujunz opened this issue Aug 16, 2021 · 2 comments
Open
Labels
encoding NeedsDesign Functionality seems desirable, but not sure how it should look like. NeedsInvestigation tooling

Comments

@yujunz
Copy link

yujunz commented Aug 16, 2021

What version of CUE are you using (cue version)?

$ cue version
cue version 0.4.0 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

a: |
  foo: bar
  ---
  bar: foo
cue import --recursive stream.yaml

What did you expect to see?

Embedded yaml imported completely

What did you see instead?

Embedded yaml is truncated on first document

import yaml656e63 "encoding/yaml"

a: yaml656e63.Marshal(_cue_a)
let _cue_a = {
	foo: "bar"
}
@yujunz yujunz added NeedsInvestigation Triage Requires triage/attention labels Aug 16, 2021
@mpvl mpvl added encoding NeedsDesign Functionality seems desirable, but not sure how it should look like. and removed Triage Requires triage/attention labels Nov 23, 2021
@mpvl
Copy link
Member

mpvl commented Nov 23, 2021

What would be the desired semantics in this case? A list of yaml documents?

It feels a bit odd that the schema would depend on the number of elements in the list.

@mpvl mpvl added the tooling label Nov 23, 2021
@yujunz
Copy link
Author

yujunz commented Nov 24, 2021

I was expecting it get imported as an array and marshal as stream, e.g.

import yaml656e63 "encoding/yaml"

a: yaml656e63.MarshalStream(_cue_a)
let _cue_a = [
	{
		foo: "bar"
	}, {
		bar: "foo"
	}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding NeedsDesign Functionality seems desirable, but not sure how it should look like. NeedsInvestigation tooling
Projects
None yet
Development

No branches or pull requests

4 participants