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 ViewComponent::Deprecation #1277

Merged
merged 5 commits into from
Feb 15, 2022
Merged

Conversation

elia
Copy link
Collaborator

@elia elia commented Feb 13, 2022

Summary

This should allow consumers to see deprecation warnings that correctly mention the next version of VC.

Silencing is already a feature of AS::Deprecation

Closes #586 and closes #1273 (this was built starting from those PRs).

@elia elia requested review from Spone and maxbeizer February 13, 2022 16:51
@elia elia self-assigned this Feb 13, 2022
@elia elia force-pushed the elia/silence-deprecations-during-tests branch 2 times, most recently from ef4943b to 584d5db Compare February 13, 2022 18:15
@elia elia marked this pull request as ready for review February 13, 2022 18:27
@elia elia requested review from BlakeWilliams and a team as code owners February 13, 2022 18:27
.rubocop.yml Outdated Show resolved Hide resolved
.rubocop.yml Outdated Show resolved Hide resolved
@elia elia force-pushed the elia/silence-deprecations-during-tests branch from 584d5db to 312954b Compare February 14, 2022 10:45
maxbeizer and others added 4 commits February 14, 2022 18:36
This should allow consumers to see deprecation warnings that correctly
mention the next version of VC.

Co-Authored-By: Elia Schito <elia@schito.me>
Co-Authored-By: Hans Lemuet <Spone@users.noreply.github.com>
```
lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old header
lib/view_component/polymorphic_slots.rb:42: warning: previous definition of header was here
lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old items
lib/view_component/polymorphic_slots.rb:42: warning: previous definition of items was here
```
…mplate

Was generating this warning:

```
test/sandbox/app/components/jbuilder_component.json.jbuilder:1: warning: `frozen_string_literal' is ignored after any tokens
```

See also: https://bugs.ruby-lang.org/issues/16602
@elia elia force-pushed the elia/silence-deprecations-during-tests branch from 6fe37cb to 30edbb7 Compare February 14, 2022 17:37
lib/view_component.rb Outdated Show resolved Hide resolved
@maxbeizer
Copy link
Contributor

👋 thanks for picking up what I started and never got back around to 🙇 💖

Co-authored-by: Cameron Dutro <camertron@github.com>
@elia elia merged commit 25f37ca into main Feb 15, 2022
@elia elia deleted the elia/silence-deprecations-during-tests branch February 15, 2022 14:51
BlakeWilliams pushed a commit that referenced this pull request Feb 15, 2022
* Add ViewComponent::Deprecation

This should allow consumers to see deprecation warnings that correctly
mention the next version of VC.

Co-Authored-By: Elia Schito <elia@schito.me>
Co-Authored-By: Hans Lemuet <Spone@users.noreply.github.com>

* Avoid warning about polymorphic slots getter being redefined

```
lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old header
lib/view_component/polymorphic_slots.rb:42: warning: previous definition of header was here
lib/view_component/polymorphic_slots.rb:42: warning: method redefined; discarding old items
lib/view_component/polymorphic_slots.rb:42: warning: previous definition of items was here
```

* Remove the unsupported frozen_string_literal comment from jbuilder template

Was generating this warning:

```
test/sandbox/app/components/jbuilder_component.json.jbuilder:1: warning: `frozen_string_literal' is ignored after any tokens
```

See also: https://bugs.ruby-lang.org/issues/16602

* Add deprecation horizon management to the release script

* Update deprecation copy for manually loading the engine

Co-authored-by: Cameron Dutro <camertron@github.com>

---

Co-authored-by: Max Beizer <max.beizer@gmail.com>
Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com>
Co-authored-by: Cameron Dutro <camertron@github.com>
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.

None yet

4 participants