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

Vet doesn't output data files location when erroring #681

Closed
marcosnils opened this issue Jan 26, 2021 · 3 comments
Closed

Vet doesn't output data files location when erroring #681

marcosnils opened this issue Jan 26, 2021 · 3 comments

Comments

@marcosnils
Copy link

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

cue version 0.3.0-beta.3 linux/amd64

Does this issue reproduce with the latest release?

Latest beta release

What did you do?

Followed the example on https://cuelang.org/docs/tutorials/tour/intro/validation/

What did you expect to see?

cue vet output in the example URL listed on the link above

What did you see instead?

# cue vet data.yaml schema_ext.cue 
languages.1.name: invalid value "dutch" (out of bound =~"^\\p{Lu}"):
    ./schema_ext.cue:3:8

As you can see it's missing the error reference in the data file.

@myitcv
Copy link
Contributor

myitcv commented Jan 29, 2021

Hey there @marcosnils!

Confirmed in a616925 via:

exec cue vet schema.cue data.yaml

-- data.yaml --
languages:
  - tag: en
    name: English
  - tag: nl
    name: dutch
  - tag: no
    name: Norwegian
-- schema.cue --
#Language: {
	tag:  string
	name: =~"^\\p{Lu}" // Must start with an uppercase letter.
}
languages: [...#Language]

cc @mpvl

@myitcv
Copy link
Contributor

myitcv commented Jan 29, 2021

This also acts as a reminder that all of our docs/examples etc should be generated/tested.

cueckoo pushed a commit that referenced this issue Feb 17, 2021
Fixes #681

Change-Id: If5242b68f57031a8c52f37978b5d9ae6b35aa03d
cueckoo pushed a commit that referenced this issue Feb 17, 2021
Fixes #681

Change-Id: If5242b68f57031a8c52f37978b5d9ae6b35aa03d
cueckoo pushed a commit that referenced this issue Feb 17, 2021
Fixes #681

Change-Id: If5242b68f57031a8c52f37978b5d9ae6b35aa03d
cueckoo pushed a commit that referenced this issue Feb 17, 2021
Fixes #681

Change-Id: If5242b68f57031a8c52f37978b5d9ae6b35aa03d
@cueckoo
Copy link

cueckoo commented Jul 3, 2021

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

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
Projects
None yet
Development

No branches or pull requests

3 participants