rails / spring-watcher-listen

MIT License
64 stars 35 forks source link

Support spring 3.0 #26

Closed timdorr closed 2 years ago

timdorr commented 3 years ago

This loosens the version query for spring to support the newly released 3.0. The changes appear to be mostly around dropping support for older Rails versions, so there shouldn't be any changes needed in this library.

Closes #25

timdorr commented 3 years ago

BTW, if folks want to use this now, just use my repo temporarily:

gem 'spring-watcher-listen', github: 'timdorr/spring-watcher-listen'

You should have it in a :development group, so it won't affect your production workloads, in case you're worried about me doing evil things 😃

humphreyja commented 2 years ago

@timdorr Thanks for doing this! Rails 7 alpha2 won't run without this change due to a change that breaks Spring. It is fixed in 3.0. Looking forward to having this merged in.

FraDim commented 2 years ago

Hey @jonleighton 👋

In case this missed you, do you have any plans on releasing this?

jonleighton commented 2 years ago

@FraDim thanks for the ping, I hadn't seen this.

I'm no longer really involved in maintaining Spring (I'm actually 100% using Elixir these days...)

Given that this gem is a dependency of Rails, and Spring itself is already managed by the Rails org, I think it would make sense to transfer this repo and the gem management to the Rails org. WDYT @fxn @rafaelfranca?

rafaelfranca commented 2 years ago

Sounds good to me.

h0jeZvgoxFepBQ2C commented 2 years ago

@rafaelfranca Could you merge this PR? Thank you!

rafaelfranca commented 2 years ago

I can't merge anything yet. Jon needs to transfer first.

h0jeZvgoxFepBQ2C commented 2 years ago

Thanks so much @jonleighton ! ❤️

jonleighton commented 2 years ago

@rafaelfranca OK, I have done the following:

I intended to release a new version with this change, but there is still one failing test (due to https://github.com/rails/spring/commit/87dc8cee8f0fb463c256775d58ae5ad627fe7410):

  1) Error:
ListenWatcherTest#test_add_directory_with_dangling_symlink:
NoMethodError: undefined method `check_stale' for #<Spring::Watcher::Listen:0x000055e32be04fe8 @_mutex=#<Thread::Mutex:0x000055e32be04db8>, @root="/tmp/d20211104-1368267-iy8664", @latency=0.001, @files=#<Set: {}>, @directories=#<Set: {"/tmp/d20211104-1368267-iy8664/subdir"}>, @stale=false, @listeners=[], @on_debug=nil>
    /home/turnip/.gem/ruby/3.0.0/bundler/gems/spring-7ca995584bed/test/support/watcher_test.rb:189:in `block in <class:WatcherTest>'

So I thought I'd let you decide what's the best solution for that.

Thanks :pray:

afdev82 commented 2 years ago

I can't merge anything yet. Jon needs to transfer first.

@rafaelfranca jonleighton did that, but we need a new version (#27). The repo is still under jonleighton, I don't see any repo in your account / Rails org. Thanks!

rafaelfranca commented 2 years ago

Oh, that is right. It seems the transfer expired before I could accept. @jonleighton can you start it again please?

jonleighton commented 2 years ago

@rafaelfranca I have re-initiated the transfer. I also added you to as a repo collaborator because I thought then I could make you an owner and you can do it in your own time, but I can't actually see a way to achieve that (maybe because I'm not paying for GitHub...)

toobulkeh commented 2 years ago

Bump for @rafaelfranca after the holidays :)

afdev82 commented 2 years ago

Bump for @rafaelfranca after the holidays :)

This PR is merged, it's missing only a new version. See this open issue for the support for Spring v4.

toobulkeh commented 2 years ago

It's merged—but not released as a gem. Since the transfer it needs a new release!

feliperaul commented 2 years ago

While a new release doesn't happen, you can fix it by pointing your gemfile to use the master branch, since the patch was already merged:

gem 'spring-watcher-listen', github: "rails/spring-watcher-listen", branch: "master"

Also, if you're updating (to rails 7 for instance), use bundle update spring spring-watcher-listen afterwards (be sure to unlock your spring version in your gemfile if it's locked, you need at least version 3)

konalegi commented 2 years ago

Do you have any plans to release it anytime soon? Thanks!

Mange commented 2 years ago

Please don't let "perfect" become the enemy of the "good". Just because the gem cannot support Spring 4 doesn't mean some people would like to update older codebases to Spring 3 first. Upgrading everything right up until the edge of requiring newer versions of Ruby, then upgrading Ruby, and then moving along, for example.

I don't think there should be anything blocking this from being released in a new version and when Spring 4 support is added later, then that is just another new release.