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

Fix v6 bootstrapping from v5 #1668

Merged
merged 1 commit into from
Jul 15, 2021
Merged

Conversation

starkos
Copy link
Member

@starkos starkos commented Jul 13, 2021

What does this PR do?

Updated—my first build didn't catch all cases.

Trying to bootstrap the Premake6 build using Premake5 can throw an error "module 'dom' not found". This fix prevents Premake5 from picking up the v6 modules when run within a v6 source directory, by always loading modules from the same directory where their _preload.lua script was located.

How does this PR change Premake's behavior?

If an embedded script calls require(), embedded modules will now be given precedence over scripts on the local file system. This situation only occurs during the bootstrapping phase of a release build, and in that situation we should always be using the embedded scripts, since what's on the file system might not be in sync with the native code used in the build.

In addition to fixing v6 bootstrapping, this should also help with using v5 to bootstrap a new v5 build as well.

Anything else we should know?

Nope.

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 (no great way to unit test this)
  • 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!

@samsinsane
Copy link
Member

This looks to have broken bootstrapping?

@starkos
Copy link
Member Author

starkos commented Jul 14, 2021 via email

@starkos
Copy link
Member Author

starkos commented Jul 14, 2021

Apologies for the premature PR…I've had another look at it and come up with a more complete solution.

@starkos starkos merged commit 64f1b34 into premake:master Jul 15, 2021
@starkos starkos deleted the v6-bootstrapping branch October 22, 2021 14:27
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.

3 participants