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

maint: Added base64 gem explicitly dependency #1658

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

hsbt
Copy link
Contributor

@hsbt hsbt commented Jan 16, 2024

Before the change?

octokit.rb warns the following message With Ruby 3.3.0.

/Users/hsbt/.local/share/gem/gems/octokit-8.0.0/lib/octokit/client/code_scanning.rb:3: warning: base64 was loaded from the standard library, but is not part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of octokit-8.0.0 to add base64 into its gemspec.

This means octokit.rb is not working after Ruby 3.4 release. We should add base64 as dependency.

After the change?

Above warning is suppressed.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @hsbt Thanks for the contributions here! Before we can move forward would you mind addressing the lint issue of making sure the deps are in the spec file in alphabetical order. That way CI can run complete.

Alternatively you can give owner commit access to your fork and I can make the changes.

@nickfloyd nickfloyd added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label Jan 16, 2024
@nickfloyd nickfloyd changed the title Added base64 gem explicitly dependency maint: Added base64 gem explicitly dependency Jan 16, 2024
@hsbt
Copy link
Contributor Author

hsbt commented Jan 17, 2024

@nickfloyd done to sort alphabetical order.

Copy link

@xuanxu xuanxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nickfloyd nickfloyd self-requested a review January 29, 2024 15:22
Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know your thoughts on my suggestion around reducing the scope of impact.

@@ -5,6 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'octokit/version'

Gem::Specification.new do |spec|
spec.add_dependency 'base64'
Copy link
Contributor

@nickfloyd nickfloyd Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
spec.add_dependency 'base64'
spec.add_dependency 'base64' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3')

What are thoughts about approaching it like this? I know that it shouldn't matter but I would like to reduce the surface area of the impact. Given that pre v3.3 can getbase64 from stdlib without the warn I think this approach should be ok.

Let me know your thoughts when you get the chance, I am good with either way! Thanks.

Copy link
Contributor Author

@hsbt hsbt Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfotunately, it's not working. I'm member of Ruby core team and RubyGems team.

RubyGems couldn't handle condition of Ruby version for dependency. RubyGems only support required_ruby_version and required_rubygems_version for gemspec, not dependency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarity! I've merged it as is and will ship it once I get a few more changesets in.

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to favor getting this in given our 3.4 builds/ci are failing - we can discuss the merits of making it a conditional dependency later.

Thanks @hsbt for the contributions here ❤️ !

@nickfloyd nickfloyd merged commit 4d2b8c8 into octokit:main Jan 29, 2024
12 checks passed
@hsbt hsbt deleted the add-dependency-base64 branch January 29, 2024 22:46
@hsbt
Copy link
Contributor Author

hsbt commented Jan 30, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants