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

Do we really need to require the bundler? #107

Open
bibendi opened this issue May 30, 2024 · 3 comments
Open

Do we really need to require the bundler? #107

bibendi opened this issue May 30, 2024 · 3 comments

Comments

@bibendi
Copy link

bibendi commented May 30, 2024

Hi!
Do we really need to require the bundler here?

require 'bundler'

It is not in the gemspec list, actually.

We want to get the list of snippets by running synvert-ruby --list --format json and get the following output

Resolving dependencies...
[{"group":"rails-template","name":"prepare", blablabla

which breaks JSON.parse

Even if we run synvert-ruby -v we get

Resolving dependencies...
1.10.3 (with synvert-core 2.0.1)
@flyerhzm
Copy link
Contributor

@bibendi I don't need to require the bundler here, yes, I will remove it.

But I do need bundler to parse gem versions in synvert-core-ruby https://github.com/synvert-hq/synvert-core-ruby/blob/main/lib/synvert/core/rewriter/gem_spec.rb#L35, so even I remove the line here, it may still get "Resolving dependencies..." in output when analyzing code.

I think it's a bug in the bunlder.

@mehanoid
Copy link

But I do need bundler to parse gem versions in synvert-core-ruby

But it is only used in tests? It shouldn't affect the running of synvert itself, should it?

@flyerhzm
Copy link
Contributor

@mehanoid no, it's not for test, synvert has a dsl if_gem, it will check if the current gem version matches, and I use bundler gem to read Gemfile.lock to get current gem versions.

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

3 participants