Skip to content

Fix spec compilation on Windows #2533

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

Merged
merged 1 commit into from
Apr 30, 2024
Merged

Fix spec compilation on Windows #2533

merged 1 commit into from
Apr 30, 2024

Conversation

flobernd
Copy link
Member

@flobernd flobernd commented Apr 26, 2024

ts-morph provides us with a normalized path that always uses / as the path separator (even on Windows). In this PR I replace some occurences of sep with just / in that context.

Besides that, on Windows, multi-line strings are emitted with CRLF (/r/n) instead of just LF (/n). I use some ugly replace calls to fix this. A better solution would probably be the usage of .gitattributes to make sure .ts files are always committed and checked out in LF style. But I'm not sure if that would cause any side-effects.

TODO: Order of endpoints in the output json is not consistent between Windows and Linux. I did not dig into that for now as it does not change semantics...

@flobernd flobernd requested a review from a team as a code owner April 26, 2024 09:21
@flobernd flobernd requested a review from JoshMock April 26, 2024 09:22
Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Does this resolve that undefined mess you found the other day?

@flobernd
Copy link
Member Author

@JoshMock Yes, that fixes the undefined namespace issue 🙂

@flobernd flobernd merged commit 0bdc82a into main Apr 30, 2024
7 checks passed
@flobernd flobernd deleted the fix-windows branch April 30, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants