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

Increase Lua's debug path size. #2298

Merged
merged 1 commit into from
Nov 10, 2024

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:
```
@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