Comments (12)
@zw963 Are you proposing swapping the AS gem dependency with the sequel
gem?
from light-service.
ActiveSupport no more, closing this issue.
from light-service.
Hi @zw963
LightService does not pull in all of rails. It only uses ActiveSupport, which is also a dependency that Rails has.
In fact, LS only uses these parts of ActiveSupport: active_support/core_ext/string
and active support deprecation functionality to output deprecation warnings.
It's used in places like this:
- lib/light-service/localization_adapter.rb:41
- lib/light-service/organizer/iterate.rb:11
- and probably a few other places...
I'm sure that LS could probably get away with not using AS and building its own string parsing methods, but why go through the hassle of that when AS does a great job already?
Hope this helps, and to confirm - by using LS, you will not be introducing Rails into your project. You will be introducing a dependency that happens to also be used by Rails.
from light-service.
LightService does not pull in all of rails. It only uses ActiveSupport, which is also a dependency that Rails has.
Yes, maybe describe not so accuracy, what i means is not pull in activesupport, active_interaction use this too, i never use any functionality of it. in fact , i thought the reason not use activesupport is, it hack too many core ext to ruby builtin class.
for this gem, if use only a little functionality, but pull in a big gem into project, this is not good anyway.
following is a quick search result.
https://github.com/davydovanton/stop_active_support_anywhere
from light-service.
Thanks for the feedback :)
I went through the link you provided - unfortunately, they don't offer any alternatives for the string extensions LS requires.
They do offer an alternative for handling deprecations which is something I would like to look at working on for LS.
That being said - I would encourage you to issue a PR that will remove the dependency on AS - we would really appreciate it.
from light-service.
Thanks, @gee-forr for chiming in.
I've been unhappy about having AS dependency in LightService for a long time. It was introduced a long time ago, and I think we used it for some one-off functionality that I've tried to remove, but people are still using it. 🤷♂️
I thought there was an issue to remove the AS dependency, but I can't find it.
At any rate, if anyone sends a PR where the AS dependency is removed, I'll merge it.
Thanks!
from light-service.
I went through the link you provided - unfortunately, they don't offer any alternatives for the string extensions LS requires.
In fact, some of string functionality can be refer from sequel gem.
https://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/inflections.rb#L144-L149
https://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/default_inflections.rb
BTW: sequel is a battle test long team maintain gem by @jeremyevans
from light-service.
@zw963 Are you proposing swapping the AS gem dependency with the
sequel
gem?
No, what i means is we can copy code from sequel gem. anyway, sequel code is more better than rails from my point.
even, dependency sequel is better than dependency activesupport, former no any runtime dependency, activesupport pull in too many current not so useful functionality, and gems, e.g. Do we use i18n
and tzinfo
gem which pull in by activesupport?
from light-service.
I am current working on switch from interactor to [service_actor]https://github.com/sunny/actor, it more simple than
this gem after take a quick look, maybe i will switch to light-service some day if i need a more powerful service object.
Thank you.
from light-service.
No, what i means is we can copy code from sequel gem.
Oh, I see. Yeah, I am all for it! Send a PR to kill AS dependency, and I'll merge it.
from light-service.
No, what i means is we can copy code from sequel gem.
Oh, I see. Yeah, I am all for it! Send a PR to kill AS dependency, and I'll merge it.
Okay, i can try one or two days later. though, maybe i should study use this gem first. 😄
from light-service.
I saw a old article i saw before, it explain why we don't want ActiveSupport too.
maybe i can help on remove it, but, for now, there is no reason to switch to this gem except this issue.
maybe we keeping this issue open util it done.
from light-service.
Related Issues (20)
- Yard Documentation to code write with light-service HOT 4
- Deprecation warning using organizer within an organizer HOT 7
- Rollback Block Not Invoked In Iterated Actions HOT 10
- Testing actions in isolation HOT 4
- [RFC] Closing pull requests while a new build is starting causes failures HOT 1
- Running actions in jobs HOT 11
- reusing modules within actions
- Surprising `add_to_context` orchestrator behaviour HOT 1
- How to handle default values for dependency injection? HOT 9
- Help testing LS release candidate HOT 6
- around for Actions HOT 3
- Namespacing Organizers and Actions HOT 1
- Confused about context failure HOT 1
- Can I chain Organizers together? HOT 5
- `reduce_case` not supported when running Ruby < 2.7, but not documented as such HOT 1
- README's built-in localization adapter documentation has a bug HOT 1
- How about an "after" hook that will be called after "fail_and_return!"? HOT 2
- Remove the ActiveSupport dependency HOT 1
- maintainability badge: is it pointing at an old default branch?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from light-service.