Skip to content

Add zed schema compile command#432

Merged
tstirrat15 merged 7 commits intomainfrom
add-zed-schema-compile-command
Feb 5, 2025
Merged

Add zed schema compile command#432
tstirrat15 merged 7 commits intomainfrom
add-zed-schema-compile-command

Conversation

@tstirrat15
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 commented Oct 30, 2024

Description

This is the first pass of the zed schema compile command. It adds it under a preview subcommand so that we can release to the public without setting an expectation that the API is stable. This should allow us to do releases and get feedback without locking ourselves onto a particular course.

Changes

  • Add workfiles to gitignore
  • Add readme section on difference between cmd and commands
  • Add preview command for schema compilation

Testing

Run go build ./cmd/zed/... and then run ./zed preview schema compile --help and see that it's working

Comment thread go.work Outdated
Comment thread go.work.sum Outdated
@tstirrat15 tstirrat15 force-pushed the add-zed-schema-compile-command branch 3 times, most recently from 2dab9d0 to 4137a50 Compare January 3, 2025 20:50
@tstirrat15 tstirrat15 marked this pull request as ready for review January 3, 2025 20:58
@tstirrat15 tstirrat15 marked this pull request as draft January 3, 2025 22:55
@tstirrat15 tstirrat15 force-pushed the add-zed-schema-compile-command branch from 8790ef6 to df339c4 Compare February 3, 2025 17:57
@tstirrat15 tstirrat15 marked this pull request as ready for review February 3, 2025 17:57
@tstirrat15
Copy link
Copy Markdown
Contributor Author

Evan pointed out that absolute paths don't seem to work, and that seems like a sane use case. I'll fix that.

Comment thread .gitignore Outdated
# Local-only files
go.work
go.work.sum

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think these need to be ignored 3 times?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I still haven't figured out merge conflict resolution with jujutsu 😅

@tstirrat15 tstirrat15 force-pushed the add-zed-schema-compile-command branch from 6d1285d to 9afa309 Compare February 4, 2025 23:41
@tstirrat15 tstirrat15 force-pushed the add-zed-schema-compile-command branch from 9afa309 to 49a926e Compare February 4, 2025 23:42
Copy link
Copy Markdown
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Not blocking, but I do think the error message could be better when the file being referenced is missing:

9:18AM ERR terminated with errors error="failed to read schema file: open /Users/evan/Downloads/schemastesting/subjects.zed: no such file or directory"

Ideally this would say something about the import statement on line 1 of root.zed, etc.

@tstirrat15 tstirrat15 merged commit b49f8bb into main Feb 5, 2025
@tstirrat15 tstirrat15 deleted the add-zed-schema-compile-command branch February 5, 2025 16:05
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants