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

chore: simplify rollup config #2

Open
wants to merge 1 commit into
base: dev/packages-debug
Choose a base branch
from

Conversation

dckc
Copy link
Member

@dckc dckc commented Jun 24, 2024

With this tweak, yarn build:deployer gives me...

  const {
    // must be supplied by caller or template-replaced
    bundleID = "b1-cfc44b6338eceb9fd63439998109892d0f862197292f28558eb1ef3221a13ad9bc4af82f8a99fdd47b47ea4067fc91fe9b0a338d0def6345dd82d2ee9b1298ea",
  } = config?.options?.[contractName] ?? {};

@dckc
Copy link
Member Author

dckc commented Jun 24, 2024

rollup version?

strange... I seem to be using v2.79

$ yarn run -s rollup -v
rollup v2.79.1

but...

$ yarn why rollup
...
=> Found "[email protected]"
info Has been hoisted to "rollup"
info Reasons this module exists
   - "workspace-aggregator-2e176e86-1227-491c-b164-825ed94c212b" depends on it
   - Hoisted from "_project_#dapp-agoric-orca-contract#rollup"
   - Hoisted from "_project_#dapp-agoric-orca-ui#vite#rollup"
...
=> Found "@agoric/rpc#[email protected]"
info Reasons this module exists
   - "_project_#dapp-agoric-orca-ui#@agoric#react-components#@agoric#rpc#vite" depends on it
   - Hoisted from "_project_#dapp-agoric-orca-ui#@agoric#react-components#@agoric#rpc#vite#rollup"
Done in 0.42s.

@Jovonni
Copy link
Contributor

Jovonni commented Jun 24, 2024

eureka!

const {
    // must be supplied by caller or template-replaced
    bundleID = "b1-b889067978e04b511921fadd1a333ae3009eccb17b54faefa0ea33e3a467aebb191a7abf8d0c152be6e073b5680b7d94264ad23102a80f1858d95ce346a7ceb5"
  } = config?.options?.[contractName] ?? {};

just reverted everything

contract/tools/rollup-plugin-core-eval.js

const pattern = new RegExp(`bundleID\\b = Fail.*`);
...
const revised = code.replace(
    pattern,
    `bundleID = ${JSON.stringify(`b1-${bundle.endoZipBase64Sha512}`)}`,
);

same config as you show above

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