Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Apr 2, 2024

No description provided.

@hsbt hsbt enabled auto-merge (rebase) April 2, 2024 02:19
@hsbt hsbt merged commit a65d49c into ruby:master Apr 2, 2024
@hsbt hsbt deleted the ostruct branch April 2, 2024 02:51
dhh pushed a commit to rails/jbuilder that referenced this pull request Apr 29, 2024
This commit uses OpenStruct only if available because of the following reasons:

- Starting from Ruby 3.4.0dev, Using `ostruct` raises the following 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.

- And when the warning category is `:performance` it also raises this warning.
> "OpenStruct use is discouraged for performance reasons

Refer to
https://bugs.ruby-lang.org/issues/20309
ruby/ruby#10428
ruby/ostruct#56
Fix #561
koic added a commit to koic/yard that referenced this pull request May 7, 2024
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
makicamel added a commit to makicamel/rspec-core that referenced this pull request Jul 6, 2024
requiring ostruct is introduced at rspec@5cd41d3 and
removed using OpenStruct at rspec@d7e4033 .
ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0.
Related https://bugs.ruby-lang.org/issues/20309 ruby/ruby#10428
makicamel added a commit to makicamel/rspec-core that referenced this pull request Jul 7, 2024
requiring ostruct is introduced at rspec@5cd41d3 and
removed using OpenStruct at rspec@d7e4033 .
ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0.
Related https://bugs.ruby-lang.org/issues/20309 ruby/ruby#10428
tabfugnic added a commit to tabfugnic/mini_exiftool that referenced this pull request Sep 23, 2024
Starting in Ruby 3.5, `pstore` and `ostruct` will not be bundled with
Ruby's default gems, and will need to be added as explicit
dependencies. The deprecation warnings merged into 3.4 for
[pstore][pstore] and [ostruct][ostruct] and then backported for the
[release of 3.3.5][3.3.5]

[pstore]: ruby/ruby#10430
[ostruct]: ruby/ruby#10428
[3.3.5]: ruby/ruby#11420
yahonda added a commit to yahonda/sprockets that referenced this pull request Oct 22, 2024
This commit bumps the required Rake version to suppress the following warnings:

```ruby
$ ruby -v
ruby 3.4.0dev (2024-10-21T16:48:53Z master 5131fb5dbe) +PRISM [x86_64-linux]
$ bundle exec rake 2>&1 |grep -i ostruct
ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:2: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
./home/yahonda/src/github.com/rails/sprockets/lib/rake/sprocketstask.rb:2: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
```

- Rake v13.2.0 does not depend on OpenStruct
https://github.com/ruby/rake/releases/tag/v13.2.0
ruby/rake#545

- Ruby 3.4.0dev emits OpenStruct warnings
https://bugs.ruby-lang.org/issues/20309
ruby/ruby#10428
yahonda added a commit to yahonda/sprockets that referenced this pull request Oct 22, 2024
This commit bumps the required Rake version to suppress the following warnings:

```ruby
$ ruby -v
ruby 3.4.0dev (2024-10-21T16:48:53Z master 5131fb5dbe) +PRISM [x86_64-linux]
$ bundle exec rake 2>&1 |grep -i ostruct
ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
/home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.4.0+0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb:2: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
./home/yahonda/src/github.com/rails/sprockets/lib/rake/sprocketstask.rb:2: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
```

- Rake v13.2.0 does not depend on OpenStruct
https://github.com/ruby/rake/releases/tag/v13.2.0
ruby/rake#545

- Ruby 3.4.0dev emits OpenStruct warnings
https://bugs.ruby-lang.org/issues/20309
ruby/ruby#10428
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