Skip to content

Conversation

@tritao
Copy link
Contributor

@tritao tritao commented Oct 13, 2024

What does this PR do?

When Lua reports a stack traceback, it prints the path to the files.

But by default, right now, it's limited to 60 characters, which gets super annoying when trying to work on the codebase, as paths are ellipsized if they are bigger, which prevents from Ctrl-clicking on them to go to the right location in the IDE/editor.

This increases the limit to double the default size, which so far has worked fine for me.

Before:

stack traceback:
        .../premake/modules/gmake/tests/cpp/test_make_pch.lua:66:

After:

stack traceback:
/home/joao/dev/tools/premake/modules/gmake/tests/cpp/test_make_pch.lua:66:

How does this PR change Premake's behavior?

Nicer path outputs for errors.

Anything else we should know?

It changes Lua's luaconf.h. Unfortunately I don't think there is any other way since the original header does not check if the value is already defined, so even if we define it ourselves in premake5.lua, the value is overriden by the default one, with some warnings to boot.

So change it in the conf file, which contains a section for local modifications anyway.

@tritao tritao marked this pull request as ready for review October 13, 2024 01:27
When Lua reports a stack traceback, it prints the path to the files.

But by default, right now, it's limited to 60 characters, which gets
super annoying when trying to work on the codebase, as paths are
ellipsized if they are bigger, which prevents from Ctrl-clicking on them
to go to the right location in the IDE/editor.

This increases the limit to double the default size, which so far has
worked fine for me.

Before:
```
stack traceback:
        .../premake/modules/gmake/tests/cpp/test_make_pch.lua:66:
```

After:
```
stack traceback:
/home/joao/dev/tools/premake/modules/gmake/tests/cpp/test_make_pch.lua:66:
```
@tritao tritao force-pushed the increase-lua-path-limit branch from 5aaf25a to 8636bbf Compare October 15, 2024 23:11
@nickclark2016 nickclark2016 merged commit 9ca6f92 into premake:master Nov 10, 2024
15 checks passed
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

Successfully merging this pull request may close these issues.

2 participants