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

Fixes for Spicy v1.11.0 #15

Merged
merged 3 commits into from
Aug 6, 2024
Merged

Fixes for Spicy v1.11.0 #15

merged 3 commits into from
Aug 6, 2024

Conversation

mmguero
Copy link
Collaborator

@mmguero mmguero commented Aug 6, 2024

removed inout from reference argument

fix for unsupported type for unit parameter 'cfgMap': type of inout unit parameters must itself be a unit; for other parameter types, use references instead of inout

explanation from @bbannier on Slack:

The technical reason this works is that references in Spicy already provide mutable access to the wrapped data (interior mutability). Having an inout on a reference parameter would seem to mean “function can reseat this reference”, but we do not provide that.

replace hilti:: with spicy::

From release notes:

The Spicy compiler has become a bit more strict and is now rejecting some ill-defined code constructs that previous versions ended up letting through. Specifically, the following cases will need updating in existing code:

  • Identifiers from the (internal) hilti:: namespace are no longer accessible. Usually you can just scope them with spicy:: instead.

rename result variables to resultRec

zeek/spicy#90 made result a type keyword, so you can no longer have variables named result (syntax error, unexpected RESULT, expecting identifier or scoped identifier). I've renamed my result variables in the .spicy file to be resultRec.

tested

zkg install https://github.com/mmguero-dev/icsnpp-synchrophasor
The following packages will be INSTALLED:
  https://github.com/mmguero-dev/icsnpp-synchrophasor (main)

Proceed? [Y/n] y
Running unit tests for "https://github.com/mmguero-dev/icsnpp-synchrophasor"
Installing "https://github.com/mmguero-dev/icsnpp-synchrophasor".........................................................
Installed "https://github.com/mmguero-dev/icsnpp-synchrophasor" (main)
Loaded "https://github.com/mmguero-dev/icsnpp-synchrophasor"

@kkvarfordt kkvarfordt merged commit 4c76c00 into cisagov:main Aug 6, 2024
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