Skip to content

refactor: migrate to OsPath #608 - #646

Open
blackheaven wants to merge 8 commits into
haskell:masterfrom
blackheaven:refactor/ospath-migration
Open

blackheaven wants to merge 8 commits into
haskell:masterfrom
blackheaven:refactor/ospath-migration

Conversation

@blackheaven

Copy link
Copy Markdown

My MuniHac contribution to close #608

Comment thread lsp-test/src/Language/LSP/Test/Files.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test/Files.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test/Session.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
@blackheaven
blackheaven requested a review from Bodigrim October 9, 2026 20:56
@blackheaven

Copy link
Copy Markdown
Author

@Bodigrim thanks for your review, I should have handled all your comments.

@blackheaven
blackheaven force-pushed the refactor/ospath-migration branch from 00a7ed0 to ab9caec Compare October 9, 2026 21:00
Comment thread lsp-test/src/Language/LSP/Test/Session.hs
Comment thread lsp-test/src/Language/LSP/Test.hs Outdated
Comment thread lsp-types/test/URIFilePathSpec.hs Outdated
Comment thread lsp/src/Language/LSP/Server/Processing.hs Outdated
Comment thread lsp/src/Language/LSP/VFS.hs Outdated
Comment thread lsp/src/Language/LSP/VFS.hs Outdated
@blackheaven
blackheaven requested a review from Bodigrim October 9, 2026 21:49
The OsPath migration switched document reads to binary FileIO.readFile',
which unlike the previous text-mode read does not translate CRLF to LF on
Windows, breaking three lsp-test assertions against LF-expected contents.
Add readFileUtf8Lenient (lenient UTF-8 decode + CRLF/CR to LF
normalization) and use it in openDoc and the applyEdit auto-didOpen path.
Comment thread lsp/src/Language/LSP/Server/Processing.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test/Session.hs Outdated
@blackheaven
blackheaven requested a review from Bodigrim October 10, 2026 07:16
Comment thread lsp/src/Language/LSP/Server/Processing.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test/Session.hs
@blackheaven
blackheaven requested a review from Bodigrim October 10, 2026 12:10

@Bodigrim Bodigrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not a maintainer here, but OsPath stuff looks fine to me.

@blackheaven

Copy link
Copy Markdown
Author

@Bodigrim thanks for the many code reviews :)

@blackheaven blackheaven left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For reference, the result of the live code review at MuniHac with fendor

Comment thread lsp-test/bench/SimpleBench.hs Outdated
Comment thread lsp-test/src/Language/LSP/Test/Files.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
@blackheaven

Copy link
Copy Markdown
Author

@fendor I have applied the changes discussed earlier today (except os which is private, but I got rid of QuasiQuotes)

Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
Comment thread lsp-types/src/Language/LSP/Protocol/Types/Uri.hs Outdated
Comment thread lsp-types/test/URIFilePathSpec.hs
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.

Drop GHC 9.4, switch fully to OsPath

3 participants