Skip to content
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

Workaround for long file path issues on Windows? #670

Closed
5 tasks
Manish-Giri opened this issue May 24, 2021 · 4 comments
Closed
5 tasks

Workaround for long file path issues on Windows? #670

Manish-Giri opened this issue May 24, 2021 · 4 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@Manish-Giri
Copy link

Software versions

Please provide at least OS and version of pact-js

  • OS: Windows 10
  • Consumer Pact library: "pact-node": "~10.11.0"
  • Provider Pact library: e.g. pact-jvm-provider-maven_2.11 v 3.3.8
  • Node Version: 10.24.1

Issue Checklist

Please confirm the following:

  • I have upgraded to the latest
  • I have the read the FAQs in the Readme
  • I have triple checked, that there are no unhandled promises in my code
  • I have set my log level to debug and attached a log file showing the complete request/response cycle
  • For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem

I just ran into the same issue with Pact errors during npm run test due to long folder tree as described here in #237. Moving the entire repository over to C:\Test-Pact worked, but I can't keep things outside of the Users directory, (example: C:\Users\JohnDoe) otherwise our Antivirus setup starts freaking out.

I've also ensured that the LongPathsEnabled property in the Windows Registry has been enabled, but this does not seem to have any effect, as reported by other users in the linked issue.

Is there any workaround to this problem? Surely, using "shallow paths" can't be the permanent solution?

@Manish-Giri Manish-Giri added the bug Indicates an unexpected problem or unintended behavior label May 24, 2021
@mefellows
Copy link
Member

Is there any workaround to this problem? Surely, using "shallow paths" can't be the permanent solution?

It's not. Our v3 branch will solve that problem, but it's not out of beta yet (it's working, but the interface will change).

I'm not aware of other workarounds, although I'd hope they exist in today's day and age!

@Manish-Giri
Copy link
Author

@mefellows Okay, thank you!!

@TimothyJones
Copy link
Contributor

Some extra context - the problem exists because pact-js delegates to the Ruby pact core binaries, and there is a long-standing bug with long paths in Ruby. When searching for the issue to link to, I found it has (just) been fixed: ruby/ruby#4505

To get Windows long file support with the ruby binaries, we'll need to wait for the fix to be released, and then we'll need a version of Travelling Ruby (which packages the Ruby binaries cross-platform) which supports the future version of Ruby.

As Matt says, the next major release of Pact-JS will work around this problem by using the Rust pact core instead (which brings several other improvements).

@mefellows
Copy link
Member

Closing. 10.x.x removes this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants