Skip to content

Conversation

@palas
Copy link
Contributor

@palas palas commented Jul 24, 2025

Changelog

- description: |
    Updated `proto-js-bundle` nix output to create a single `.js` bundle file with qualified names for each `.proto`
  type:
  - feature
  projects:
  - cardano-wasm

Context

Previous solution in PR #913 doesn't work, because each generated .js file uses the same namespace, and they override each other. So this PR modifies the script that generates them to produce a single .js file that has their exports qualified by their module name, so that we only need to import one file, and so that the namespaces don't collide.

This PR also updates all the code that used it, and generalises the wasm library so that it also stores the clients qualified, and thus it can do multiple different types of queries easily.

How to trust this PR

I think, again testing is the most important bit. Also ensure the code style is good, and the comments are up to date, enough, and clear.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@palas palas force-pushed the qualify-js-from-proto branch from a124c8e to 635558f Compare July 24, 2025 13:16
@palas palas added this pull request to the merge queue Jul 24, 2025
Merged via the queue into master with commit 30488e5 Jul 24, 2025
29 checks passed
@palas palas deleted the qualify-js-from-proto branch July 24, 2025 15:40
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.

4 participants