Closed mtchavez closed 4 years ago
Does thwait
still need to be required at all? I don't see any obvious references to ThreadsWait
anywhere...
Very good point. Now that you bring it up, I searched the git history and it appears to have been cargo-culted and just worked ™ because it was bundled with Ruby before 2.7
. Can a maintainer confirm this is the case and we can remove it entirely? Good catch @maneframe
Have you got a link to a build with the actual error?
I am not clear how you want people to contribute these sorts of things so I made a pull request #116 adding 2.7 to the build matrix to show the failure. It is really just using 2.7 and running the tests as the pull request description suggests. Failure: https://travis-ci.org/pact-foundation/pact-mock_service/jobs/635004086
What happens if you remove the require 'thwait'
line?
I would love to do something like that if the dependency isn't needed. Just need a maintainer to make a decision on that.
The pact-mock_service maintainer? That's me. I've just deleted the require locally, and it doesn't cause any immediately apparent errors, but I'm not sure if that particular piece of code has a test in this code base. The mock service code was pulled out of a single "monolith" pact gem years ago, so the tests that execute it might actually be in the pact gem, because it's only the Pact gem that uses the AppManager.
When I remove the thwait require, I then get a heap of keyword argument errors for webmock.
Not that the thwait gem has anything to do with it - just saying, there's a next level of errors after the thwait issue!
I've deleted the require, it all seems to work ok.
What
Ruby 2.7 has removed several standard library components and replaced them with gems. One of those is
thwait
which is being used in this gem.Suggested Fix
Notes
Ruby 2.7 release notes has the following