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

Expand documentation on exporting Spicy types #252

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

bbannier
Copy link
Member

No description provided.

@bbannier bbannier self-assigned this Mar 11, 2024
@bbannier bbannier marked this pull request as ready for review March 11, 2024 09:41
@bbannier bbannier requested a review from rsmmr March 11, 2024 09:41
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
devel/spicy/reference.rst Outdated Show resolved Hide resolved
@bbannier bbannier force-pushed the topic/bbannier/spicy-export branch from 8e63eef to fc46532 Compare March 11, 2024 10:42
Copy link
Member

@rsmmr rsmmr left a comment

Choose a reason for hiding this comment

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

Looks good now!

Comment on lines +615 to +620
export SPICY_ID [with { [SIPCY_FIELD_NAME [&log], ]... }];
export SPICY_ID [as ZEEK_ID [ with { [SIPCY_FIELD_NAME [&log], ]...] }];
export SPICY_ID [without { [SIPCY_FIELD_NAME, ]... }];
export SPICY_ID [as ZEEK_ID [ without { [SIPCY_FIELD_NAME, ]...] }];
export SPICY_ID &log;
export SPICY_ID as ZEEK_ID &log;
Copy link
Member

Choose a reason for hiding this comment

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

I'd still try to compress this into a single line but may be matter of taste.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what I initially tried, but it always overflowed the box in the rendered pages so it required horizontal scrolling, and also required a lot of nesting. I was unsure whether adding line breaks for readability would be confusing to readers. The full expression was

export SPICY_ID [&log | with { [SPICY_FIELD_NAME [&log], ]...} | without { [SPICY_FIELD_NAME, ]... } | as ZEEK_ID [&log | { [SPICY_FIELD_NAME [&log], ]...} | without { [SPICY_FIELD_NAME, ]...}]]

Copy link
Member

Choose a reason for hiding this comment

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

I'd still try to compress this into a single line but may be matter of taste.

How about this:

export SPICY_ID [as ZEEK_ID] [with/without { SPICY_FIELD_NAME [&log], ...}] [&log]

The field &log isn't 100% correct (doesn't apply to without), but seems good enough?

@bbannier bbannier merged commit a071940 into master Mar 12, 2024
10 checks passed
@bbannier bbannier deleted the topic/bbannier/spicy-export branch March 12, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants