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 the wasm build #1075

Merged
merged 4 commits into from
Jul 18, 2024
Merged

fixes for the wasm build #1075

merged 4 commits into from
Jul 18, 2024

Conversation

khieta
Copy link
Contributor

@khieta khieta commented Jul 17, 2024

Description of changes

While working on #854 I realized that the wasm build was not actually generating valid TypeScript (largely due to changes I made for #757). This PR fixes the issues & adds CI to avoid this mistake in the future.

Detailed summary:

  • Fixes the bad TypeScript by adjusting various tsify annotations
  • Adds CI to check that the generated TypeScript is valid
  • Adds #![cfg_attr(feature = "wasm", allow(non_snake_case))] in a few files to suppress annoying VSCode warnings
  • Removes the cedar-wasm/src/{validator, authorizer}.rs files since it's simpler to expose the FFI functions directly rather than introduce a trivial wrapper

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change (breaking or otherwise) that only impacts unreleased or experimental code.

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

@khieta khieta marked this pull request as ready for review July 17, 2024 18:10
@khieta
Copy link
Contributor Author

khieta commented Jul 17, 2024

Still need to investigate the new wasm-example failure, but the PR is otherwise ready for review.

Update: I believe the issue is downstream in cedar-examples. Looks like an error in the tests wasn't being caught due to the borked TypeScript. (Will fix after this PR is merged.)

Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

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

Seems legit

@khieta khieta merged commit bf1599a into main Jul 18, 2024
17 of 18 checks passed
@khieta khieta deleted the khieta/wasm-fixes branch July 18, 2024 13:43
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.

3 participants