Announcing ICP Ninja 🄷

Is there a way to kick ninja once you’ve added a mops package to stop telling you the library is not defined? It deploys fine and I’m guessing mops run during the deploy…but it would be nice if the ide registered it as well.

Also, mops integration or a terminal emulator that let’s us mops add vector would be sweet.

Edit: I saved and was informed to create an account…upon returning this error went away. Perhaps you need to be logged in for there to be a place for mops to process and put stuff ā€˜somewhere’? I also didn’t seem to see the expected message about reserving a canister, so maybe I had a stale session? I seem to get stuck at a red ā€œBuilding Canisters..ā€ message but see no error in the console. I shared the project and loaded it up in a different browser and had the same effect. ICP Ninja. This was originally a motoko playground import…not sure if that has any direct implications or not.

I started a new backend, motoko, project and removed any reference to vector. Still no luck and the spinning build in progress turns into a red ā€œBuild in Progressā€¦ā€ with no deployment.

I was able to deploy something yesterday that worked, but not today.

1 Like

We’re looking into it, thanks for reporting. My best guess why it disappeared after logging in is something about reloading the page re-triggering cache checks.

I get the same issue as you. Looking at backend logs I can see Canister called ic0.trap with message: 'RTS error: Cannot grow memory'. It doesn’t fail with other projects, so I would guess that it has to do with the playground import but hard to say. I’ll dig a bit deeper…
Edit: when downloading the project and running it locally the canister exceeds it memory limit. At the moment it looks a lot to me like this is a problem with Motoko, not Ninja.
Edit 2: The code makes an infinitely long vector as part of installation. If I add x := x+1; to the loop it deploys just fine. That doesn’t excuse the useless error message

If I create a new project deployments work for me now. Can you still not deploy fresh projects?

1 Like

We found a way to fix the package cache issues. We’ll bundle it with the next release that we plan to have ready next week.

The crappy error message is the result of our build setup not being ready to pass on errors that happen during canister installation. We plan on replacing the whole build setup in the coming weeks, so we will not fix that anymore and instead make sure it works properly in the new setup.

1 Like

I assure you that the stupid code creating an infinite loop was a purposeful test of the ninja system. :grimacing:

Fixing the loop does indeed let me deploy the canister.

2 Likes

Hi @Vivienne & @fxgst

I wanted to confirm if this is a feature or a bug.

I was playing around with ICP Ninja and realized that I can directly import any ICP Codebase from my GitHub to ICP Ninja by using this URL: https://icp.ninja/editor?g={github-repo}

If this is a feature, then it’s so cool :fire:. I am not sure whether it was publicly announced (or if you’ve done a demo of it).

Now this begs the question: When are we going to have a custom terminal that allows me to run my commands? I.e, similar to codespaces on GitHub? This is for a case example where I have a custom script that I need to run before deploying my project.

6 Likes

That’s a feature and we have it in our backlog to add a nice ā€˜import from GH’ flow.

I do not expect that we’ll ever have a full-fledged terminal available. That would require us to provision VMs or something like that for everyone, and I do not see a way to do this with such a small team (5 people, of which 3 actually code) and without endless possibilities for things to go wrong. If you have ideas I’d be very curious to hear them!

But there is a way to do some more custom builds. If you make your canister of type custom then you can add arbitrary build steps, such as running a script.

6 Likes

The import from Github button is now live on the landing page on the top right

6 Likes