Giter Club home page Giter Club logo

Comments (11)

adomokos avatar adomokos commented on June 26, 2024 1

@zw963 Are you proposing swapping the AS gem dependency with the sequel gem?

from light-service.

gee-forr avatar gee-forr commented on June 26, 2024

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.

zw963 avatar zw963 commented on June 26, 2024

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.

gee-forr avatar gee-forr commented on June 26, 2024

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.

adomokos avatar adomokos commented on June 26, 2024

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.

zw963 avatar zw963 commented on June 26, 2024

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 avatar zw963 commented on June 26, 2024

@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.

zw963 avatar zw963 commented on June 26, 2024

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.

adomokos avatar adomokos commented on June 26, 2024

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.

zw963 avatar zw963 commented on June 26, 2024

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.

zw963 avatar zw963 commented on June 26, 2024

I saw a old article i saw before, it explain why we don't want ActiveSupport too.

https://rosenfeld.herokuapp.com/en/articles/ruby-rails/2017-05-01-feeling-alone-in-the-ruby-community-and-replacing-rails-with-roda

maybe i can help on remove it, but, for now, there is no reason to switch to this gem except this issue.

sunny/actor#53

maybe we keeping this issue open util it done.

from light-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.