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

Fully support tact.config.json in Tact projects and move away from wrappers/ (compilables/) #138

Open
novusnota opened this issue Jul 14, 2024 · 0 comments

Comments

@novusnota
Copy link
Contributor

novusnota commented Jul 14, 2024

Problem

At the moment, it's impossible to control anything beyond project-specific compilation options in tact.config.json as it's used in Blueprint.

Furthermore, with upcoming introduction of things like compilerVersion to tact.config.json (tact-lang/tact#574), the Tact and Blueprint would become even more driven apart. And that's not good :)

Current solution

In PR #96, the auto-sourcing of tact.config.json was introduced. However, in order not to re-architect the compilation pipeline, I decided to keep the changes there to a minimum — and so the properties in tact.config.json had to be re-purposed to match the Blueprint approach to compilation.

While this made it possible to better configure Blueprint behavior in Tact projects, it introduced a significant discrepancy between the Tact compiler and Blueprint.

Suggestion for a better solution

Get rid of wrappers/ (recently renamed to compilables/) completely in Tact projects and switch to using tact.config.json:

  • Whenever a new contract is created with blueprint create, ask people if they want a new compilation entry point (project) added to tact.config.json. If yes, then modify its contents. If not, don't touch it :)
  • In blueprint build, only show the projects as defined in tact.config.json.
  • The current build/ folder may still be actively suggested as the output folder. With the full source of tact.config.json, it wouldn't matter if users chose a different folder as long as they specified it there — Blueprint would just take TypeScript wrappers based on that.

This change would:

  • Align the behavior of the Blueprint and Tact's compiler, which would simplify documentation and maintenance efforts tenfold!
  • Help all third-party tools rely on a single source of truth for compilation configuration, the tact.config.json.
  • Help users of https://github.com/tact-lang/tact-template easily migrate to Blueprint
  • Help all users specify compilerVersion and/or projects (entry points) for compilation in a single, well-documented place with auto-completion and hover suggestions provided by configSchema.json.
  • Generally make life easier for the end-users :)

Useful links:

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

No branches or pull requests

1 participant