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

Make it easier to reference user defined types in the schema language #1331

Merged
merged 17 commits into from
Feb 15, 2021

Conversation

tobim
Copy link
Member

@tobim tobim commented Feb 2, 2021

📔 Description

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

  1. Start with "Introduce a common schema file for aliases". This is the user facing change.
  2. Review the unit tests added in "Test extended schema parsing functionality"
  3. Review the rest of the commits in the regular order.

@tobim tobim added the feature New functionality label Feb 2, 2021
@tobim tobim requested a review from a team February 2, 2021 14:50
@tobim tobim force-pushed the story/ch21720/common-symbol-table branch from 0c38d22 to 4a0cb8d Compare February 2, 2021 14:53
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

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

This is functionality, nice work! I yet have to give it spin locally, but I already went over the code and left a couple of suggestions.

CHANGELOG.md Outdated Show resolved Hide resolved
schema/types/0_common.schema Outdated Show resolved Hide resolved
libvast/test/schema.cpp Outdated Show resolved Hide resolved
libvast/test/schema.cpp Outdated Show resolved Hide resolved
libvast/test/schema.cpp Outdated Show resolved Hide resolved
libvast/vast/concept/parseable/vast/schema.hpp Outdated Show resolved Hide resolved
libvast/vast/concept/parseable/vast/schema.hpp Outdated Show resolved Hide resolved
libvast/vast/concept/parseable/vast/schema.hpp Outdated Show resolved Hide resolved
libvast/vast/concept/parseable/vast/schema.hpp Outdated Show resolved Hide resolved
libvast/vast/concept/parseable/vast/schema.hpp Outdated Show resolved Hide resolved
@tobim tobim force-pushed the story/ch21720/common-symbol-table branch 2 times, most recently from a0a914e to bb1ec78 Compare February 10, 2021 08:24
tobim and others added 16 commits February 11, 2021 18:05
The new schema parser makes the schema dsl order-independent.
For example:
```
type foo = record{
  x: bar #attr2=chirp #attr2=frog #attr3=hog
}
type bar = int #attr1=cat #attr2=dog
```
Gets accepted and works intuitively.
The attributes are merged with the field attributes taking
precedence over the attributes from the type. The resolved type of
`foo.x` is `int #attr1=cat #attr2=frog #attr3=hog`.
Mostly improved variable and type names.

Co-authored-by: Matthias Vallentin <matthias@tenzir.com>
It isn't needed any more for the 2-phase lookup.
This also fixes some leftovers from the previous commit integrating
some suggested changes from code review.
@tobim tobim force-pushed the story/ch21720/common-symbol-table branch from bb1ec78 to 33d8056 Compare February 11, 2021 22:16
@tobim tobim requested a review from mavam February 11, 2021 23:12
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

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

Nice work!

@tobim tobim merged commit ede087b into master Feb 15, 2021
@tobim tobim deleted the story/ch21720/common-symbol-table branch February 15, 2021 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants