-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Deprecate SolidusFrontend #4320
Deprecate SolidusFrontend #4320
Conversation
Thanks, @gsmendoza! Any chance we could reuse Also, if you like, we could talk about this change and its motivation in the |
Thanks @waiting-for-dev ! I'll make the following updates:
|
c889d05
to
d9d5a64
Compare
frontend/lib/solidus_frontend.rb
Outdated
require 'spree/deprecation' | ||
|
||
deprecation_message = <<~MSG | ||
NOTE: SolidusFrontend is deprecated; use SolidusStarterFrontend instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this message is not clear. We don't want people currently using solidus_frontend
to start using the new frontend because they would have to rebuild their frontend entirely. I think what we want to say to people is that, this gem will be removed from the meta-package solidus
and if they still want to use it, they need to add it manually to the Gemfile, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kennyadsl How about this:
NOTE: SolidusFrontend is deprecated. It will be moved out of the
solidus
meta-package gem in a future version of Solidus. Once moved out, you'll need to manually addsolidus_frontend
to your Gemfile in order to continue using it.
For fresh Solidus applications, we recommend you use SolidusStarterFrontend instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the text of the message may work. I'm only a bit concerned that, with this approach, there's no way to remove the deprecation message until we actually remove solidus_frontend
from solidus
. Is there a way to check that solidus_frontend is present in the Gemfile and print the message only otherwise? Or do you have any other idea about how to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check that solidus_frontend is present in the Gemfile and print the message only otherwise?
That question intrigued me 🙂 It seems we can get the information through:
Bundler.locked_gems.dependencies
However, it seems to be very slow. I don't know if there's a way to cache it thanks to the bundler/setup
Rails apps do in config/boot.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and probably move the message at the boot phase so that, even if it's slow it only happens once when the application boots (but maybe it's the same in this file?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsmendoza, I'm not sure I follow. solidus_frontend
is already a standalone gem. Then, it's a dependency on solidus meta-gem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this does solve! 🙂
You are right, if people switch to the gem in the Gemfile they will be able to get the version without the deprecation notice. There's just one thing to address: we need to understand how the versioning of those two gems will work, because both need to be on RubyGems, and they can't have the same version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waiting-for-dev we can move solidus_frontend
to another GitHub repository, remove it as a dependency of solidus
, and start publishing new versions on RubyGems of it from its own new repository only. Do you see any issue with this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I get it. Yeah, makes sense 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to understand how the versioning of those two gems will work, because both need to be on RubyGems, and they can't have the same version.
@kennyadsl I remember your idea before is to give the external gem a different name e.g. solidus_deprecated_frontend
. If we do that, we can maintain both solidus_frontend
and solidus_deprecated_frontend
in RubyGems :)
d9d5a64
to
19adfb8
Compare
@kennyadsl @waiting-for-dev I updated the deprecation message based on our offline discussion. Appreciate if you can take a look. Thanks! |
CHANGELOG.md
Outdated
@@ -47,6 +47,10 @@ suffix. | |||
|
|||
- Add configuration option for `migration_path` [#4190](https://github.com/solidusio/solidus/pull/4190) ([SuperGoodSoft](https://github.com/supergoodsoft/)) | |||
|
|||
### Frontend | |||
|
|||
- SolidusFrontend is deprecated; use [SolidusStarterFrontend](https://github.com/solidusio/solidus_starter_frontend) instead. SolidusFrontend will be removed in a future version of Solidus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, maybe we can be cautious here and make it clearer that we're not recommending old storefronts built on top of solidus_frontend
to replace it.
19adfb8
to
2fbf69f
Compare
CHANGELOG.md
Outdated
### Frontend | ||
|
||
DEPRECATION WARNING: SolidusFrontend is deprecated. It will be removed from the | ||
Solidus meta-package gem in a future version of Solidus. Furthermore, its code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say "solidus meta-package" (with initial "s" in lower case), as that's the name of the gem, and people will be less confused.
Maybe we can specify that the Solidus version where it'll be removed will be 4.0.
Other than that, it's very clear 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say "solidus meta-package" (with initial "s" in lower case), as that's the name of the gem, and people will be less confused.
I'm okay with that, since "solidus" specifically refers to the gem. But how about SolidusFrontend and Solidus in "in a future version of Solidus"? For those, let's keep the camel case?
2fbf69f
to
9bca948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @gsmendoza!!
Goal ---- We want to deprecate SolidusFrontend so that developers, especially those building fresh Solidus apps, will choose to SolidusStarterFrontend instead.
9bca948
to
2118c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository is a demonstration that the solidus_frontend "as-an-extension" works by just unpacking the full solidus
gem and adding it as a standalone dependency.
We can go ahead!
Goal
We want to deprecate SolidusFrontend so that developers, especially those
building fresh Solidus apps, will choose to SolidusStarterFrontend instead.
Background
This is part of an epic to replace the SolidusFrontend gem with SolidusStarterFrontend.
Screenshots
Checklist: