Skip to content

Improve error message of include#2066

Merged
nickclark2016 merged 1 commit intopremake:masterfrom
Jarod42:improve_include_error_message
Aug 9, 2023
Merged

Improve error message of include#2066
nickclark2016 merged 1 commit intopremake:masterfrom
Jarod42:improve_include_error_message

Conversation

@Jarod42
Copy link
Contributor

@Jarod42 Jarod42 commented Apr 21, 2023

What does this PR do?

Change error message for include/includeexternal from
"Error: cannot open $name: No such file or directory" (from dofile) to
"Error: Cannot find either $name or $name.lua or $name/premake5.lua or $name/premake4.lua"

How does this PR change Premake's behavior?

Error message change.

Anything else we should know?

Done after viewing https://stackoverflow.com/questions/75986260/include-path-not-detected-when-running-premake

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

`"Error: cannot open $name: No such file or directory"` (from `dofile`)
to
`"Error: Cannot find either $name or $name.lua or $name/premake5.lua or $name/premake4.lua"`
@nickclark2016 nickclark2016 merged commit bcbe8ea into premake:master Aug 9, 2023
@Jarod42 Jarod42 deleted the improve_include_error_message branch August 10, 2023 09:59
@Jarod42
Copy link
Contributor Author

Jarod42 commented Aug 10, 2023

@nickclark2016 : That PR seems to break premake :-/, I got:

Error: ** Error: Cannot find either vs2005.lua or vs2005.lua.lua or vs2005.lua/premake5.lua or vs2005.lua/premake4.lua

You might revert that PR currently. Sorry for the inconveniences.

I need to investigate what change, as I pretty sure I didn't have that when testing that code :/

(Integrating tests would have caught that ;-) )

@nickclark2016
Copy link
Member

I trusted you :( Reverting

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