vlang / vls

V language server. (Old V language server - see v-analyzer)
MIT License
314 stars 53 forks source link

Windows uri fix #408

Closed SirZenith closed 1 year ago

SirZenith commented 1 year ago

Fixing problem mentioned in issue 407.

Rewrite methods of URI struct for better Windows URI support.

Adding normalize method call to all URI query for client request parameter.

Diagnostic report currently doesn't record correct file path, this pull request also fix that.

SirZenith commented 1 year ago

That force push fix URI encoding for *nix system. And delete vls.log committed by mistake.

SirZenith commented 1 year ago

In server/general_test.v, at line 97 and line 109. This test asserts equality of paths in those two line.

As far as I know, file URI takes only absolute Unix path. So I think line 109 and 110 should be

expected_err_path := os.join_path('/non_existent', 'path', 'vls.log')
expected_alt_log_path := os.join_path(server.get_folder_path(), 'logs', 'vls___non_existent_path.log')

Note that there should be 3 underscore in expected_alt_log_path (at vls___non...), slash at the beginning of file path is converted into underscore.

Am I right?