-
Notifications
You must be signed in to change notification settings - Fork 694
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
schema/gen: Include .json instead of excluding .go #538
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9a55fa4
to
eab6872
Compare
this didn't work for me |
On Mon, Jan 30, 2017 at 09:40:52AM -0800, Vincent Batts wrote:
this didn't work for me :-\
The test I ran above [1] worked for me. Are you using a fresh esc
install? Maybe it depends on Go version (I'm running 1.7.1)?
[1]: #538 (comment)
|
sorry, it works, but when i had tmp files (vim |
On Tue, Jan 31, 2017 at 10:40:23AM -0800, Vincent Batts wrote:
sorry, it _works_, but when i had tmp files (vim `.*.swp` files) the
pattern still built them into the schema-fs.
In my local testing, I added a schema/.defs-image.json.swp file, and
it was not included in fs.go [1]. Can you give me steps to reproduce
your inclusion? Maybe with a Dockerfile? Or by sharing your Go, esc,
etc., versions? For example, here is it not happening in a Docker
container where I've created a .defs-image.json.swp:
$ docker run --rm golang:1.7.5 sh -c 'go get -d github.com/opencontainers/image-spec/schema && cd $GOPATH/src/github.com/opencontainers/image-spec && git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*" && git fetch -q origin && git checkout origin/pr/538 && go get -u github.com/mjibson/esc && touch schema/.defs-image.json.swp schema/defs.json && make schema-fs && grep "\"/" schema/fs.go'
…
HEAD is now at eab6872... schema/gen: Include .json instead of excluding .go
generating schema fs
"/config-schema.json": {
"/content-descriptor.json": {
"/defs-config.json": {
"/defs-image.json": {
"/defs.json": {
"/image-layout-schema.json": {
"/image-manifest-schema.json": {
"/manifest-list-schema.json": {
"/": {
[1]: #538 (comment)
|
rebase pls |
To avoid accidentally including .swp, .un~, etc. [1]. Test with: $ touch schema/.defs-image.json.swp $ touch schema/.content-descriptor.json.un~ $ touch schema/foojson $ make schema-fs $ grep '"/' schema/fs.go "/config-schema.json": { "/content-descriptor.json": { "/defs-config.json": { "/defs-image.json": { "/defs.json": { "/image-layout-schema.json": { "/image-manifest-schema.json": { "/manifest-list-schema.json": { "/": { local: "/", [1]: opencontainers#533 (comment) Signed-off-by: W. Trevor King <[email protected]>
eab6872
to
6f633c2
Compare
jbouzane
approved these changes
Mar 8, 2017
wking
added a commit
to wking/image-spec
that referenced
this pull request
Mar 9, 2017
With: $ go get -u github.com/mjibson/esc $ make schema/fs.go now that 6f633c2 (schema/gen: Include .json instead of excluding .go, 2017-01-27, opencontainers#538) has landed. Signed-off-by: W. Trevor King <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To avoid accidentally including
.swp
,.un~
, etc. Test with:CC @vbatts.