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

Add ostruct to runtime dependency #1545

Closed
wants to merge 1 commit into from

Conversation

koic
Copy link
Contributor

@koic koic commented May 7, 2024

Description

This PR adds ostruct to runtime dependency to suppress the following warning:

$ ruby -v
ruby 3.4.0dev (2024-04-19T07:33:16Z master 7951b349ab) [x86_64-darwin23]
$ cd path/to/rubocop
$ bundle exec rake
/Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/yard-0.9.36/lib/yard/templates/template_options.rb:2:
warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.

This change is aimed at Ruby 3.5 and will start showing warnings from Ruby 3.4: ruby/ruby#10428

To maintain the following behavior, the dependency will be added in the gemspec to resolve this. https://github.com/lsegal/yard/blob/v0.9.36/lib/yard/templates/template_options.rb#L32-L34

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

This PR adds `ostruct` to runtime dependency to suppress the following warning:

```console
$ ruby -v
ruby 3.4.0dev (2024-04-19T07:33:16Z master 7951b349ab) [x86_64-darwin23]
$ cd path/to/rubocop
$ bundle exec rake
/Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/yard-0.9.36/lib/yard/templates/template_options.rb:2:
warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
```

This change is aimed at Ruby 3.5 and will start showing warnings from Ruby 3.4:
ruby/ruby#10428

To maintain the following behavior, the dependency will be added in the gemspec to resolve this.
https://github.com/lsegal/yard/blob/v0.9.36/lib/yard/templates/template_options.rb#L32-L34
koic added a commit to koic/rubocop that referenced this pull request May 7, 2024
This is a workaround to prevent the following warning in YARD:

```console
$ ruby -v
ruby 3.4.0dev (2024-04-19T07:33:16Z master 7951b349ab) [x86_64-darwin23]
$ cd path/to/rubocop
$ bundle exec rake
/Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/yard-0.9.36/lib/yard/templates/template_options.rb:2:
warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0.
Add ostruct to your Gemfile or gemspec.
```

The fundamental resolution will likely be addressed in lsegal/yard#1545.
koic added a commit to koic/rubocop that referenced this pull request May 7, 2024
This is a workaround to prevent the following warning in YARD:

```console
$ ruby -v
ruby 3.4.0dev (2024-04-19T07:33:16Z master 7951b349ab) [x86_64-darwin23]
$ cd path/to/rubocop
$ bundle exec rake
/Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/yard-0.9.36/lib/yard/templates/template_options.rb:2:
warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0.
Add ostruct to your Gemfile or gemspec.
```

The fundamental resolution will likely be addressed in lsegal/yard#1545.
@lsegal lsegal closed this in 1694c3d Sep 3, 2024
@koic koic deleted the add_ostruct_to_runtime_dependency branch September 3, 2024 07:51
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

Successfully merging this pull request may close these issues.

1 participant