-
Notifications
You must be signed in to change notification settings - Fork 62
fix: remove decoder service #2415
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
Conversation
Signed-off-by: ap891843 <[email protected]>
With this change the server relies on the lsp client to send normalized URIs. Will that be a problem? Should the incoming URIs be normalized e.g. in the LSP message handlers? |
Yes. This was the initial idea. Then decide the appropriate place to normalize the URI's. I am still not sure, what would be the correct place for it. Should it sit on client or the LS server ?
|
By LSP values we should minimize client specific changes. I like idea with custom URI class, for now it can be wrapper on string with cleanup constructor. |
fyi, tested it on shared drive ( windows shared drive using hostname in URI and basic testing on mac and win). Seems to work. But fails for path like //./c:, which is a known issue |
I'd also prefer a special type (value class) that would contain the normalized uri - I expect a lot of changes in the rest of the server though. |
Let's add unit tests first if we can break something with this PR. For example, if we suppose that the Client will send us a normalized URI, let's add unit tests that are failing if received URI is not normalized |
5df4d8a
to
6a9db86
Compare
Signed-off-by: ap891843 <[email protected]>
6a9db86
to
ffd5ff4
Compare
server/engine/src/test/java/org/eclipse/lsp/cobol/service/utils/WorkspaceFileServiceTest.java
Show resolved
Hide resolved
updated |
server/engine/src/test/java/org/eclipse/lsp/cobol/usecases/TestFileDescriptor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: ap891843 <[email protected]>
This service was originally introduced due to compatibility issues in the format of URI's send by the client (was never a good idea). After several refactoring at the client side, we adopted to UNC file format and this service should no longer be required. In fact this decode service would lead to the in-consistency in the way we represent URI's on the LSP server. Its time for it to go, RIP
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: