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

2.3.1 and 2.3.2 have broken dependencies #1098

Closed
tvdeyen opened this issue Jan 12, 2020 · 15 comments
Closed

2.3.1 and 2.3.2 have broken dependencies #1098

tvdeyen opened this issue Jan 12, 2020 · 15 comments

Comments

@tvdeyen
Copy link
Contributor

tvdeyen commented Jan 12, 2020

Hey. Great work with Ransack.

It seems you released a new version of Ransack that was meant to raise polyamorous version, but the latter has never been released. Currently you cannot bundle either ransack 2.3.1 nor 2.3.2. The latest released version on rubygems of polyamorous is 2.3.0. Bundler cannot find it.

Also it seems that you released the removal of Rails 5.0 and 5.1 in 2.3.1 (a patch level release). Was this a mistake or intentional? Not that I am a huge semver fan, but this seems odd to me.

The pressing issue here is that currently you cannot bundle ransack. As you can see in this PR AlchemyCMS/alchemy_cms#1711

IMO you should release a 2.3.3 that reverts the changes of 2.3.1 and 2.3.2 and release a 3.0.0. (Please do not yank gems. This will cause even more issues for people using CIs). Also please do not forget to also release polyamorous with ransack, since they are separated gems now.

Thanks.

@tvdeyen
Copy link
Contributor Author

tvdeyen commented Jan 12, 2020

Also it seems that you released the removal of Rails 5.0 and 5.1 in 2.3.1 (a patch level release). Was this a mistake or intentional? Not that I am a huge semver fan, but this seems odd to me.

Disclaimer: I read this from the changelog and did not tested this with code. Maybe I am wrong here, but the changelog tells it that way

@scarroll32
Copy link
Member

Hi @tvdeyen thanks very much for your message. You have some good points, I will look after it this evening.

I was under the impression that Polyamorous had been completely imported into the Ransack, as it has been archived. If Ransack is in fact pointing to still pointing to the external Polyamorous I will update it.

https://github.com/activerecord-hackery/ransack/tree/master/polyamorous/lib/polyamorous

Perhaps I need to publish Polyamorous from within Ransack? If this is the case I'll reverse the integration until it can be completely imported properly.

Thanks.

@tvdeyen
Copy link
Contributor Author

tvdeyen commented Jan 12, 2020

As far as I can tell polyamorous has a separate gemspec now (#1002). That means it has to be build and pushed to rubygems separately, as gems are just packaged files uploaded.

I also saw that the ransack gem still includes all files from the git repo, meaning that polyamorous is now shipped twice - once in the ransack gem package and once with polyamorous itself.

@scarroll32
Copy link
Member

scarroll32 commented Jan 12, 2020 via email

@scarroll32
Copy link
Member

@tvdeyen please see #1099

I think this is the way forward. Afterwards we can do some refactoring and add new features to Ransack, but let's get the 6.0 work done.

@gregmolnar
Copy link
Member

Polyamorous stayed a separate gem, but the files are in the same repository, so issues can be managed at one place. I kept it a separate gem to make it possible to use it as a dependency without relying on ransack as well. Like what baby_squeel does.
The only caveat is, ransack and polyamorous needs to be released together, because they depend on being on the same version, but that can be easily solved while keeping the current structure.

@scarroll32
Copy link
Member

scarroll32 commented Jan 13, 2020

Thanks @gregmolnar I had forgotten about baby_squeel.

It doesn't seem like the project is that active https://github.com/rzane/baby_squeel/commits/master

I think Ransack needs a serious refactor, and the first step is to properly internalize Polyamorous (as a module). It will possibly need to be extended to fix these 6.0 issues. Also Polyamorous was never intended to be a shared gem, and wasn't documented etc. I think we really need to break from the past and modernize Ransack. Unfortunately there has only been a few of us contributing to the codebase.

Each major version of Rails has required changes to Polyamorous, this will probably continue.

I've posted a job on Upwork to handle these issues, and have already made an offer to a contractor https://www.upwork.com/ab/applicants/1215911323418488832/job-details.

I would prefer to continue down this path.

By the way, is anyone else having problems with 2.3.2? It's bundling fine for me for Rails 5.2.

GIT
  remote: git://github.com/activerecord-hackery/ransack.git
  revision: 901c1f262adca8e66f9311c7a0e4cd3cb02a277c
  specs:
    polyamorous (2.3.2)
      activerecord (>= 5.2.1)
    ransack (2.3.2)
      activerecord (>= 5.2.1)
      activesupport (>= 5.2.1)
      i18n
      polyamorous (= 2.3.2)

CC @mohdsameer

@deivid-rodriguez
Copy link
Contributor

deivid-rodriguez commented Jan 13, 2020

@seanfcarroll I think that might be because when you specify a git sourced gem, bundler looks for local gemspecs at the git source in order to resolve, so it will find the polyamorous gemspec which has the correct version, and be able to properly resolve. However, if you use a released version of ransack, this is going to fail because polyamorous has no matching releases in rubygems.org. polyamorous 2.3.1 and 2.3.2 need to be released to rubygems.org so that ransack 2.3.1 and 2.3.2 can be used from rubygems.org.

@scarroll32
Copy link
Member

@deivid-rodriguez ah that makes sense. Thank you.

@gregmolnar
Copy link
Member

To fix this issue we just need to release the 2 polyamorous version by the way. I will do so shortly.

@gregmolnar
Copy link
Member

gregmolnar commented Jan 13, 2020

I pushed the missing polyamorous versions, so everyone should be able to bundle now. As a follow up, I will create a PR to change the how we handle the polyamorous dependency, so it can have a separate version from ransack.

@scarroll32
Copy link
Member

Thanks for trying @gregmolnar

@gregmolnar
Copy link
Member

Here is the PR: #1101
I think this one can be closed. @tvdeyen please ping me if it still doesn't work.

@tvdeyen
Copy link
Contributor Author

tvdeyen commented Jan 13, 2020

Thanks @gregmolnar for releasing the gems.

There are still two issues remaining

Also it seems that you released the removal of Rails 5.0 and 5.1 in 2.3.1 (a patch level release). Was this a mistake or intentional? Not that I am a huge semver fan, but this seems odd to me.

and

I also saw that the ransack gem still includes all files from the git repo, meaning that polyamorous is now shipped twice - once in the ransack gem package and once with polyamorous itself.

I will create two individual issues, ok?

@gregmolnar
Copy link
Member

@tvdeyen it would be great if you would open 2 separate issues for those. Thank you!

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

No branches or pull requests

4 participants