Skip to content

Fix spec compilation on Windows#2533

Merged
flobernd merged 1 commit intomainfrom
fix-windows
Apr 30, 2024
Merged

Fix spec compilation on Windows#2533
flobernd merged 1 commit intomainfrom
fix-windows

Conversation

@flobernd
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@JoshMock Yes, that fixes the undefined namespace issue 🙂

@flobernd flobernd merged commit 0bdc82a into main Apr 30, 2024
@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