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

Not clear how to avoid the relative_url_root deprecation message #399

Closed
tagliala opened this issue Dec 30, 2023 · 5 comments · Fixed by #400
Closed

Not clear how to avoid the relative_url_root deprecation message #399

tagliala opened this issue Dec 30, 2023 · 5 comments · Fixed by #400

Comments

@tagliala
Copy link
Contributor

tagliala commented Dec 30, 2023

Shakapacker 7.2.0 deprecated relative_url_root, but is not clear from changelog, the documentation, or a freshly generated config how to avoid this warning.

I'm not sure what relative_url_root is used for, but probably shakapacker should print the deprecation error only if it is being used (have a value different from blank?)

Expected behavior:

Have an option/documentation/config entry to avoid the deprecated behavior

Actual behavior:

Running specs logs a warning on the console.

The usage of relative_url_root is deprecated in Shakapacker and will be removed in v8.

Small, reproducible repo:

diowa/ruby3-rails7-bootstrap-heroku#702

https://github.com/diowa/ruby3-rails7-bootstrap-heroku/actions/runs/7364428208/job/20044793977#step:8:14

image

Setup environment:

  • Ruby version: 3.3.0
  • Rails version: 7.1.2
  • Shakapacker version: 7.2.0
@tagliala tagliala added the bug label Dec 30, 2023
@ahangarha
Copy link
Contributor

ahangarha commented Dec 30, 2023

This is not a bug.

We will remove relative_url_root in the next major release. We cannot remove it from the compilation process now. So, we must inform developers to ensure their project is not dependent on it.

Does this deprecation message cause any issues in your project?

Regarding changelog, we have a dedicated entry for this depreciation.

- The usage of relative_url_root is deprecated in Shakapacker and will be removed in v8. [PR 376](https://github.com/shakacode/shakapacker/pull/376) by [ahangarha](https://github.com/ahangarha).

I think your suggestion to show the direction message only if it is set is good.

@ahangarha
Copy link
Contributor

@tagliala #400 should solve the issue. The deprecation message will be shown only if relative_url_root is set.

Does it work for you?

@tagliala
Copy link
Contributor Author

Thanks for the prompt answer!

This is not a bug.

I do agree. I was not sure this was a feature request either, and I was even thinking to open a discussion, but in the end I decided to use the bug template the same, apologies for the confusion

Does it work for you?

I can confirm this works, diowa/ruby3-rails7-bootstrap-heroku@e03ee10

Action: https://github.com/diowa/ruby3-rails7-bootstrap-heroku/actions/runs/7365381926/job/20046638615#step:8:1

Thanks again and Happy New Year!

@ahangarha
Copy link
Contributor

Thanks for reporting the issue

@ahangarha
Copy link
Contributor

@tagliala
FYI, v7.2.1 is released with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants