activeadmin / arbre

An Object Oriented DOM Tree in Ruby
MIT License
762 stars 74 forks source link

Lazy-load rails interactions #456

Closed ngan closed 1 year ago

ngan commented 1 year ago

Thus PR does a few things:

The way it's current done is problematic for me because it attempts to reference ActionView before it's loaded by the application itself (config/application.rb). Requiring the rails gem doesn't actually load all the rails gems.

javierjulio commented 1 year ago

Surprising this hasn't come up before. Thanks! Tests are running now.

ngan commented 1 year ago

Hey @javierjulio I think I fixed the build. This problem surfaced when I tried to use sidekiqswarm which I guess preloads all the gems without loading the rails application.

I think the next version of Rails is going to be strict about gems that are inadvertently loading Rails concerns without using load hooks: https://github.com/rails/rails/pull/46047

ngan commented 1 year ago

@javierjulio @deivid-rodriguez please let me know if I need to do anything else to get this merged and released. Happy to help!

ngan commented 1 year ago

@javierjulio @deivid-rodriguez just wanted to kindly bump this 🙇

javierjulio commented 1 year ago

@ngan I will get to this soon, thank you.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.29 :tada:

Comparison is base (83107dc) 91.36% compared to head (250063d) 91.66%.

:exclamation: Current head 250063d differs from pull request most recent head 5478006. Consider uploading reports for the commit 5478006 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #456 +/- ## ========================================== + Coverage 91.36% 91.66% +0.29% ========================================== Files 17 17 Lines 475 480 +5 ========================================== + Hits 434 440 +6 + Misses 41 40 -1 ``` | [Impacted Files](https://app.codecov.io/gh/activeadmin/arbre/pull/456?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=activeadmin) | Coverage Δ | | |---|---|---| | [lib/arbre/rails/rendering.rb](https://app.codecov.io/gh/activeadmin/arbre/pull/456?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=activeadmin#diff-bGliL2FyYnJlL3JhaWxzL3JlbmRlcmluZy5yYg==) | `87.50% <ø> (ø)` | | | [lib/arbre/rails/template\_handler.rb](https://app.codecov.io/gh/activeadmin/arbre/pull/456?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=activeadmin#diff-bGliL2FyYnJlL3JhaWxzL3RlbXBsYXRlX2hhbmRsZXIucmI=) | `100.00% <ø> (ø)` | | | [lib/arbre.rb](https://app.codecov.io/gh/activeadmin/arbre/pull/456?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=activeadmin#diff-bGliL2FyYnJlLnJi) | `100.00% <100.00%> (+6.66%)` | :arrow_up: | | [lib/arbre/railtie.rb](https://app.codecov.io/gh/activeadmin/arbre/pull/456?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=activeadmin#diff-bGliL2FyYnJlL3JhaWx0aWUucmI=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ngan commented 1 year ago

@javierjulio this is ready for another look! 🙇