OCamlPro/techelson

liquidity requires 4.06.1 and techelson requires 4.07.1

Closed this issue · 7 comments

So another small error, I keep having to add

opam switch liquidity;

and

opam switch techelson;

to my test scripts since they require different environments according to the documentation. Is the documentation out of date for liquidity or is this expected behavior?

Is your question "do I need to run opam switch before compiling techelson/liquidity"?

If so then in theory yes, that's opam's workflow, every project basically needs its own switch and switching is system-wide so...

You can try to have a single switch for both, it will probably work. For now at least. Create a switch of the latest OCaml compiler and try building both Techelson and Liquidity in the same switch. Let me know if you run into problems.

yeah, that makes sense. I was following your tutorial from https://adrienchampion.github.io/blog/tezos/techelson/with_liquidity/external.html and this came up.

What you're saying makes sense though, I will try to update the blog post soon-ish.
AdrienChampion/blog#1

However, note that you only need to be in the right switch to compile Techelson/Liquidity, but not for running them.
So, just to be sure, are you sure you need to opam switch? Do you actually modify Techelson's and Liquidity's source files often and have to re-compile them?

i'm not an expert at opam by any means to bear with me, but I think that makes sense. Some of the errors that come up are:

when I run opam switch techelson, the liquidity command no longer is found. It seems like I need to update my ~/.bashrc to keep these commands available when I switch.

Also, I get the error:

tests/test1.liq:4.52-4.65: Error: Unknown module or contract Multi

when I run:

./test.sh tests/test1.liq

or any of the other tests. I'm not sure how it knows that Multi points to contracts/multi.liq

Thanks for the quick response, really excited to use Techelson more!

i'm not an expert at opam by any means to bear with me

No worries, I am not an expert either :)

I think this is more of a workflow problem. Personally, I build ocaml projects and then link ln -s the binary to ~/.bin/liquidity or ~/.bin/techelson with ~/.bin in my path. I don't have to rely on anything, and they are always up-to-date.

That's the best advice I got, link the binary and try to be able to build both liquidity and techelson in the same switch.

Also, I get the error:

tests/test1.liq:4.52-4.65: Error: Unknown module or contract Multi

when I run:

./test.sh tests/test1.liq

Which version of liquidity are you running? That's more of a liquidity problem. With the latest version, I get

Module Techel
Contract MultiBuggy
Contract Multi
Main contract Test1
contracts/multiBuggy.liq:7.24-7.38: Error: Type error:  label admins does not belong to type MultiBuggy.storage

I'll try to investigate quickly and let you know.

Thanks for the quick response, really excited to use Techelson more!

Thank you! Do let me know if you run into more problems.

I completely forgot to let you know, but it seems the problem was solved:
OCamlPro/liquidity#197

Should we close this issue?

yep, thanks!