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

Use Struct instead of OpenStruct. #545

Merged
merged 2 commits into from
Mar 15, 2024
Merged

Use Struct instead of OpenStruct. #545

merged 2 commits into from
Mar 15, 2024

Conversation

hsbt
Copy link
Member

@hsbt hsbt commented Mar 14, 2024

I will migrate osturct as bundled gems at Ruby 3.5. We should remove its dependency from Rake.

I will migrate osturct as bundled gems at Ruby 3.5. We should remove
its dependency from Rake
@hsbt hsbt force-pushed the remove-ostrust-dependency branch from dcb5c1c to a27bb8e Compare March 14, 2024 09:11
@hsbt hsbt merged commit 24e8de2 into master Mar 15, 2024
76 checks passed
@hsbt hsbt deleted the remove-ostrust-dependency branch March 15, 2024 00:34
xjunior referenced this pull request in powerhome/audiences Apr 8, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [rake](https://github.com/ruby/rake)
([changelog](https://github.com/ruby/rake/blob/v13.2.1/History.rdoc))
| `13.1.0` -> `13.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/rubygems/rake/13.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/rubygems/rake/13.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/rubygems/rake/13.1.0/13.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/rubygems/rake/13.1.0/13.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ruby/rake (rake)</summary>

### [`v13.2.1`](https://github.com/ruby/rake/releases/tag/v13.2.1)

[Compare
Source](https://github.com/ruby/rake/compare/v13.2.0...v13.2.1)

#### What's Changed

- Suppressed "<internal:array>:52:in 'Array#each'" from backtrace by
[@&#8203;hsbt](https://github.com/hsbt) in
[https://github.com/ruby/rake/pull/554](https://github.com/ruby/rake/pull/554)
- Bump actions/configure-pages from 4 to 5 by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/ruby/rake/pull/553](https://github.com/ruby/rake/pull/553)

**Full Changelog**:
ruby/rake@v13.2.0...v13.2.1

### [`v13.2.0`](https://github.com/ruby/rake/releases/tag/v13.2.0)

[Compare
Source](https://github.com/ruby/rake/compare/v13.1.0...v13.2.0)

#### What's Changed

- Fix rule example to be correct by
[@&#8203;zenspider](https://github.com/zenspider) in
[https://github.com/ruby/rake/pull/525](https://github.com/ruby/rake/pull/525)
- Switch to use test-unit by [@&#8203;hsbt](https://github.com/hsbt)
in
[https://github.com/ruby/rake/pull/536](https://github.com/ruby/rake/pull/536)
- Removed redundant block by [@&#8203;hsbt](https://github.com/hsbt)
in
[https://github.com/ruby/rake/pull/537](https://github.com/ruby/rake/pull/537)
- Use Struct instead of OpenStruct. by
[@&#8203;hsbt](https://github.com/hsbt) in
[https://github.com/ruby/rake/pull/545](https://github.com/ruby/rake/pull/545)
- Accept FileList object as directory task's target by
[@&#8203;gemmaro](https://github.com/gemmaro) in
[https://github.com/ruby/rake/pull/530](https://github.com/ruby/rake/pull/530)
- Fix exception when exception has nil backtrace by
[@&#8203;janbiedermann](https://github.com/janbiedermann) in
[https://github.com/ruby/rake/pull/451](https://github.com/ruby/rake/pull/451)
- Add TruffleRuby on CI by
[@&#8203;andrykonchin](https://github.com/andrykonchin) in
[https://github.com/ruby/rake/pull/551](https://github.com/ruby/rake/pull/551)

#### New Contributors

- [@&#8203;zenspider](https://github.com/zenspider) made their first
contribution in
[https://github.com/ruby/rake/pull/525](https://github.com/ruby/rake/pull/525)
- [@&#8203;gemmaro](https://github.com/gemmaro) made their first
contribution in
[https://github.com/ruby/rake/pull/530](https://github.com/ruby/rake/pull/530)
- [@&#8203;janbiedermann](https://github.com/janbiedermann) made their
first contribution in
[https://github.com/ruby/rake/pull/451](https://github.com/ruby/rake/pull/451)
- [@&#8203;andrykonchin](https://github.com/andrykonchin) made their
first contribution in
[https://github.com/ruby/rake/pull/551](https://github.com/ruby/rake/pull/551)

**Full Changelog**:
ruby/rake@v13.1.0...v13.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [x] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/powerhome/audiences).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
:nosearch, :rakelib, :show_all_tasks, :show_prereqs,
:show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern,
:thread_pool_size, :trace, :trace_output, :trace_rules
).new
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nicer if this was a named class:

NoMethodError: undefined method `verbose' for an instance of #<Class:0x00000001038112e0>

vs something like:

NoMethodError: undefined method `verbose' for an instance of #<Rake::Options:0x00000001038112e0>

janz93 added a commit to lagardere-sports/ruby-client that referenced this pull request Oct 10, 2024
Loading of "ostruct" depends on Rake, so we need to explicitly load it and resolve the dependency.
Because Rake does not load "ostruct" since version 13.2.0.
[ruby/rake#545](ruby/rake#545)
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
Development

Successfully merging this pull request may close these issues.

2 participants