tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
394 stars 110 forks source link

Separate stdlib into its own NPM package #747

Open anton-trunov opened 2 months ago

anton-trunov commented 2 months ago

First of all, it will give us the freedom to change the Tact standard library without concerns for backwards compatibility, as the user will have the ability to pin the stdlib version for their projects.

It will also help with issues like this one: https://github.com/nowarp/misti/issues/107.

Now, it needs to be discussed how exactly the configuration of the stdlib version can be done. We can either rely on the NPM package manager or make it work through tact.config.json somehow.

jubnzv commented 2 months ago

It might be helpful for third-party projects that need stdlib to be installed without Tact installation, as it would simplify the workflow with paths in blueprint-misti:

https://github.com/nowarp/blueprint-misti/blob/727c7c541d29a10c6e171bd475f067c6d3df0187/src/misti.ts#L52

However, I don't think we should implement this solely for that small case, as it might complicate maintaining the stdlib.

anton-trunov commented 2 months ago

However, I don't think we should implement this solely for that small case, as it might complicate maintaining the stdlib.

Definitely. But we have a bigger fish to fry: a total redesign of the standard library without breaking backwards compatibility

Gusarich commented 2 months ago

We can either rely on the NPM package manager

This option seems good to me

novusnota commented 2 months ago

without breaking backwards compatibility

And forward-compatibility as well — if we move the stdlib into it's own package, the Tact version that it's compatible with may diverge from the one used in the compiler if we won't bundle them together (like, by putting the proper stdlib version in dependencies of Tact compiler)