-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: build on windows machines #16211
fix: build on windows machines #16211
Conversation
I'm not sure how often people build sequelize on Windows, but it might be nice to add it as a job to the CI so we can keep an eye on it |
When I pulled this and ran
|
@AjaniBilby You sure the errors are specific to the changes in this PR? Also, I dunno why is this PR marked as "Draft". I don't seem to have created it that way. It's ready for merging. There doesn't seem to be a button to unmark it as such. If the "Draft" status is something intentional marked by the repo authors then it's fine. |
It's not related to the changes in this PR, but we do not have passing tests on Windows with this change. So I think it would fall in the scope of this PR. Same as to why it's in draft. Without a CI job on Windows we don't know if it remains working so that would in my opinion be something that needs to be added before we can merge. That Windows CI job only needs passing tests on sqlite imo, not all dialects. EDIT: it is also possible that you want the scope of this PR to be limited to only building on Windows. In that case we can open a future PR to actually let the tests pass and only have a Windows CI job for successful building on Windows |
@WikiRik Ah, I see, so a windows-specific test would be required to consider this PR complete? I don't think that would be possible though. And even if it breaks Windows in any way, it's already broken as is, so my suggestion would be merging this PR as is rather than leaving it unmerged. Or, an independent 3rd party could confirm that the changes in this PR fix their Windows run. For example, @AjaniBilby. |
@WikiRik I mean, having a Windows CI builder for free for an open-source project isn't something I'd imagine existing. Why not let the users be such a CI builder. |
In my reply I started with a test, but I would also be fine with only a successful build on Windows. Then future PRs can add functionality that tests pass on Windows as well. @AjaniBilby mentioned on Slack this morning that GitHub Actions has support for Windows so it should not be too difficult to implement. I haven't taken a look into it yet today Edit; https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources |
@WikiRik I see. So this job: sequelize/.github/workflows/ci.yml Lines 16 to 23 in b2b9048
Could just be copy-pasted while replacing |
Exactly! You can use these lines; sequelize/.github/workflows/ci.yml Lines 17 to 33 in b2b9048
The compressing of the artifact is not needed for building so you can skip that. |
4152a6e
to
7e710ba
Compare
The new CI job for Windows testing appears to only check it builds successfully on windows unless I'm missunderstanding something. Even if the Edit: Just to clarify I'm not exactly sure if the |
Correct
These can be solved in a different PR. I don't think they have been caused by your changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe I spoke too soon
@WikiRik I dunno why it fails on the CI though. Runs fine on my machine. |
I should have done more digging, the same fixes done in this commit should have been applied to Once I have solved the issue I'll make a new PR which will also include a CI job which tests for this in the future. |
When I recently forked the repo, while attempting to run
npm run build
command in order to build the package, the build didn't run on my Windows machine.The reasons turned out to be:
fast-glob
package not recognizing backslashes.build
script not specifying the executable to run the.mjs
file with.After applying the changes in this PR, the build process has finished without errors.