tact-lang / tact

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

Use relative paths in compiler messages #406

Open byakuren-hijiri opened 6 days ago

byakuren-hijiri commented 6 days ago

We could make compiler's output more concise using relative paths to source files when possible.

For example, instead:

Tact compilation failed
Error: /home/user/Dev/tact-template/sources/receive.tact:2:5: Invalid receive function selector
Line 2, col 5:
  1 | contract isK {
> 2 |     external() {
          ^~~~~~~~~~~~
  3 |         42;

We could use relative paths from project's root:

Tact compilation failed
Error: sources/receive.tact:2:5: Invalid receive function selector
Line 2, col 5:
  1 | contract isK {
> 2 |     external() {
          ^~~~~~~~~~~~
  3 |         42;