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 compilation on Windows #114

Merged
merged 4 commits into from
Jul 21, 2023
Merged

Fix compilation on Windows #114

merged 4 commits into from
Jul 21, 2023

Conversation

nikku
Copy link
Member

@nikku nikku commented Jul 20, 2023

This fixes #112, which turned out to be a 🪟 only issue.

As it stands we need to properly convert paths between 🪟 and 🐧 before we normalize or join, as these node utilities do a bad (to no) job of converting.

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Jul 20, 2023
@nikku nikku marked this pull request as ready for review July 20, 2023 20:22
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Jul 20, 2023
@nikku nikku requested a review from philippfromme July 20, 2023 20:22
@nikku
Copy link
Member Author

nikku commented Jul 20, 2023

This fixes compilation of custom configs on 🪟.

@philippfromme if you want to you could add a unit test along the lines of #113.

@nikku
Copy link
Member Author

nikku commented Jul 20, 2023

Verified to work for bpmnlint-loader, too, via https://github.com/nikku/bpmnlint-loader/actions/runs/5615535015/job/15216002842.

@nikku nikku changed the title Test compile Fix compilation on Windows Jul 20, 2023
@philippfromme
Copy link
Contributor

philippfromme commented Jul 21, 2023

One of the issues I fixed on my branch is that the paths are absolute:

import rule_0 from 'C:/workspace/camunda/bpmnlint-plugin-camunda-compat/rules/camunda-cloud/element-type';

I'm not sure if this is only happening on Windows.

@philippfromme philippfromme changed the title Fix compilation on Windows Fix Compilation Jul 21, 2023
@philippfromme
Copy link
Contributor

This now also make sure rules are imported from modules instead of absolute paths.

@philippfromme
Copy link
Contributor

@nikku I've added my changes. Please have a look.

@nikku
Copy link
Member Author

nikku commented Jul 21, 2023

I've cleaned up the commits. One final remark we could consider: https://github.com/bpmn-io/bpmnlint/pull/114/files#r1270570682.

lib/support/compile-config.js Outdated Show resolved Hide resolved
@nikku nikku force-pushed the test-compile branch 2 times, most recently from abe4038 to bfd24f1 Compare July 21, 2023 14:53
@nikku nikku changed the title Fix Compilation Fix compilation on Windows Jul 21, 2023
@nikku nikku merged commit ea937dd into main Jul 21, 2023
15 checks passed
@nikku nikku deleted the test-compile branch July 21, 2023 15:06
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jul 21, 2023
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.

Compiling Config Doesn't Work as Expected
2 participants