Skip to content

Fix relative paths #4594

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 7 commits into from
Dec 8, 2021
Merged

Fix relative paths #4594

merged 7 commits into from
Dec 8, 2021

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Dec 8, 2021

Fixes #4503

Since this is for file system paths it feels incorrect to use it on
URL paths as they are different in many ways.
Before we relied on the client to resolve the base given to it by the
backend against the path.

Instead have the client pass that information along so we can resolve it
on the backend.  This means the client has to do less work.
This is re-used for incremental compilation.

Also remove del since that was the only use (and we can use fs.rmdir in
the future if we need something like this).
@code-asher code-asher requested a review from a team as a code owner December 8, 2021 20:21
@code-asher code-asher changed the title Relative paths Fix relative paths Dec 8, 2021
Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

This means the client has to do less work.

Favorite part of this whole PR 👏

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #4594 (70e6399) into main (9d9f3a4) will decrease coverage by 0.18%.
The diff coverage is 38.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4594      +/-   ##
==========================================
- Coverage   65.80%   65.61%   -0.19%     
==========================================
  Files          30       30              
  Lines        1658     1652       -6     
  Branches      333      330       -3     
==========================================
- Hits         1091     1084       -7     
- Misses        479      481       +2     
+ Partials       88       87       -1     
Impacted Files Coverage Δ
src/common/util.ts 100.00% <ø> (ø)
src/node/routes/vscode.ts 46.93% <0.00%> (ø)
src/node/routes/logout.ts 66.66% <25.00%> (+12.12%) ⬆️
src/node/http.ts 52.68% <40.00%> (-3.00%) ⬇️
src/node/routes/login.ts 84.90% <50.00%> (+3.08%) ⬆️
src/node/util.ts 73.13% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d9f3a4...70e6399. Read the comment docs.

@code-asher code-asher merged commit 4b4ec37 into coder:main Dec 8, 2021
@code-asher code-asher deleted the relative-paths branch December 8, 2021 21:52
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.

Logout does not work behind reverse proxy
2 participants