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 Webpack Config for Newer NodeJS Versions #41

Merged
merged 3 commits into from
Apr 6, 2022

Conversation

manuth
Copy link
Contributor

@manuth manuth commented Mar 30, 2022

The current Webpack settings don't work well with the current LTS version (v17) as seen in this issue: webpack/webpack#14532

Changes made in this PR will update the webpack configuration to work around this issue by adding a hashFunction to the output-setting.

@raulsntos
Copy link
Member

The current NodeJS LTS is 16.14.2, not 17 (see https://nodejs.org/en/about/releases/), but I'm not opposed to supporting a newer version than the LTS.

I tried building with 17.4.0 and it didn't seem like the config.output.hashFunction: 'xxhash64' was necessary. Can you explain what this does and why it's needed? Since the issue you mentioned is closed it seems this may have been fixed and changing the hashFunction as a workaround may no longer be needed in Webpack 5.70.0.

I also saw that you remove the make package in the docker container to build for open-vsx1. We should consider removing it, it seems to be problematic in Linux although I believe we might need it for Windows.

Footnotes

  1. https://github.com/open-vsx/publish-extensions/pull/565/files#diff-67cc6b3a3e8789d9c898df808bc20c696365e6356a7ecc49d28cdb7e5b43a566R1025

@manuth
Copy link
Contributor Author

manuth commented Mar 30, 2022

Thanks a lot for having a look at it 😄
You're right, adding a hashFunction to the settings doesn't seem to be necessary anymore for webpack 5.70.0.
I'll remove this right away.

When having make installed as a dependency, I get this error both on windows and inside the node docker container:

> godot-csharp-vscode@0.2.1 compile
> make build

make ℹ info Invoking build target
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

If you agree, I'll remove the make package.

@raulsntos
Copy link
Member

Let me defer to @neikeq on that, since he's the one who added it and probably has more context on why/how we use it.

@neikeq
Copy link
Contributor

neikeq commented Apr 1, 2022

I honestly don't remember what the make package was for, but it could always be re-added if removing it causes a regression.

@neikeq neikeq merged commit 0f273c2 into godotengine:master Apr 6, 2022
@neikeq
Copy link
Contributor

neikeq commented Apr 6, 2022

Thanks!

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