karma-webpack icon indicating copy to clipboard operation
karma-webpack copied to clipboard

fix: cross disk relative paths

Open mvanbutselaar opened this issue 5 years ago • 6 comments
trafficstars

This PR contains a:

  • [x] bugfix
  • [ ] new feature
  • [ ] code refactor
  • [ ] test update
  • [ ] typo fix
  • [ ] metadata update

Motivation / Use-Case

We use Karma and Webpack, as the base for a testing tool, which can be installed globally. On Windows there is an issue when the tool is installed on one drive (C:), and the codebase being tested is on another drive (F:).

The issue is with relative path resolving on two absolute paths on different roots/drives, which returns an absolute path. This causes the process to get stuck infinitely after compilation, due to not being able to read the output (because the lookup key is not relative).

Breaking Changes

There are no breaking changes.

Additional Info

mvanbutselaar avatar Feb 10 '20 16:02 mvanbutselaar

CLA assistant check
All committers have signed the CLA.

jsf-clabot avatar Feb 10 '20 16:02 jsf-clabot

Codecov Report

Merging #433 into master will increase coverage by 1.08%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   42.46%   43.55%   +1.08%     
==========================================
  Files           3        3              
  Lines         219      225       +6     
  Branches       48       49       +1     
==========================================
+ Hits           93       98       +5     
- Misses        103      104       +1     
  Partials       23       23              
Impacted Files Coverage Δ
src/karma-webpack.js 48.03% <71.42%> (+1.06%) :arrow_up:

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 3cc35b3...3642b0f. Read the comment docs.

codecov[bot] avatar Feb 10 '20 16:02 codecov[bot]

Hey, is this something you are still interested in?

codymikol avatar Feb 01 '21 02:02 codymikol

Yes we are still interested in this. I just rebased on latest master, what else can we do to move this forward?

mvanbutselaar avatar Feb 01 '21 10:02 mvanbutselaar

He @mvanbutselaar , sorry for the delay. We just released a v5.0.0 release that changed quite a bit since this PR. If you're still interested, would you mind seeing if this is still an issue against the latest release?

We no longer use relative paths from what I cant tell so hopefully this is resolved for you :crossed_fingers: .

If not I can do my best to help you get this resolved in the latest version.

Thanks for your contribution, it is much appreciated!

codymikol avatar Feb 17 '21 03:02 codymikol

By the way, paths are still broken for Windows with the current master build: Error: EINVAL: invalid argument, mkdir 'C:\Users\Simon\AppData\Local\Temp\_karma_webpack_82360\D:\code\osmd\opensheetmusicdisplay\dist\src'

Maybe something like this PR is still needed.

(On MacOS, the path issues seem solved with the current master)

sschmidTU avatar Dec 16 '21 19:12 sschmidTU

closing due to lack of feedback

codymikol avatar Oct 11 '22 16:10 codymikol