ZenVoich / mops

Package manager for the Motoko programming language
https://mops.one
MIT License
39 stars 5 forks source link

Failure to publish large library #131

Closed Gekctek closed 1 year ago

Gekctek commented 1 year ago

Alright, I have a weird one. My guess is this is a problem with the size of the library but when i publish my new datetime library I get this error:

gekctek@DESKTOP-5VC8P53:~/git/motoko_datetime$ mops publish
Publishing datetime@0.1.0 [:::::     ]
/usr/local/lib/node_modules/ic-mops/node_modules/@dfinity/agent/lib/cjs/polling/index.js:67
            throw new Error(`Call was rejected:\n` +
                  ^

Error: Call was rejected:
  Request ID: 998e0b210f00934c19f61b15f13badf7dbecb56e9a6ae0c08d35e796c4908d08
  Reject code: 5
  Reject text: Canister oknww-riaaa-aaaam-qaf6a-cai trapped explicitly: assertion failed at main-canister.mo:313.3-313.32

    at pollForResponse (/usr/local/lib/node_modules/ic-mops/node_modules/@dfinity/agent/lib/cjs/polling/index.js:67:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async caller (/usr/local/lib/node_modules/ic-mops/node_modules/@dfinity/agent/lib/cjs/actor.js:190:35)
    at async file:///usr/local/lib/node_modules/ic-mops/commands/publish.js:242:13

Node.js v18.16.0

The reason its so large is just including all the IANA data for locales/timezones. I dont see anything in the error about size but figured that would be good context

ZenVoich commented 1 year ago

There is a limit to the number of package files(max 100), how many files does your package consist of?

Gekctek commented 1 year ago

looks like a couple hundred in https://github.com/edjCase/motoko_datetime/tree/main/iana/timezones https://github.com/edjCase/motoko_datetime/tree/main/iana/locales

Is there any way around this? I have them in seperate files so someone can pick and choose their tz/locale vs doing all of them at once

ZenVoich commented 1 year ago

I've increased the limit to 300 files. Please try now

Gekctek commented 1 year ago

It worked! Thank you https://mops.one/datetime