-
Notifications
You must be signed in to change notification settings - Fork 26
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
Skip gems in RSpec integration #56
Conversation
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
This change just surprised me. Until then, the gems are effectively part of the monolith, and as such we'd like to run tests for it. But after this change, how are we supposed to correctly run tests for our gems? |
@iMacTia We chatted a bit about this one and I'm wondering if you really need to have a Is there some gem-related feature you're getting right now that you rely on? If not, have you considered just moving that code into a pack until it's ready to be a fully-fledged gem that has its tests run in isolation? |
Thank you for the quick reply @alexevanczuk. The main reason I opted for making them gems is that we can have more control over dependencies. I think the bulk of the issue here is that this is a temporary step: these "gems" are not isolated enough to be moved out or tested in isolation, but we want to start having them as packages so we can better track ownership and packwerk violations, to help us get to the point where we can deploy them as real isolated gems. I would also like to flip your question, which is what I asked myself before taking this decision: "what is the advantage of having fully-fledged gems inside the codebase, if they could already be deployed as external gems, and declare them as packs"? The only explanation I could think of is in the context of a monorepository (multiple projects living inside the same repo, but tested and deployed separately), but that's not something we want to do and potentially up to teams to decide if they want to leverage or not. One possible solution would be to keep the current behaviour as the default, but leave the possibility to opt-in to make gems more integrated (i.e. skip the |
I'm not following this... if the Gem is not tested in isolation then it is not actually using the list of dependencies in the gemspec. That is – the gemspec is completely ignored from a dependency bundling perspective and only the root Gemfile is used. Therefore it's equivalent to just having a plain text list (e.g. a comment in a pack saying what gems it uses) since it's not enforced. Is there a use case for having this list otherwise? Or is it executed somehow in a manner I'm not understanding?
That's a good goal but why does having a gem make this easier? Ownership and packwerk violations can both be tracked when the system is just a pack.
I can think of a bunch of reasons why we'd want to have a fully-fledged gem within a codebase (you do actually want to share them with other applications, having test isolation or other forms of development isolation, etc.). However, I'm still not understanding the advantage here of having a subsystem have a gemspec if it's not actually being developed on / deployed as a gem.
The reason I'm hesitating here is because I still don't totally understand the use case so far. One of our goals with |
Thanks @alexevanczuk, I completely get what you're saying and I realise what we're trying to do is not very "purist" 😅. I guess the choice is on our side to either revert them back to simple packages (and note gem dependencies somewhere else, as you suggested) or to go all-in with the gem idea, meaning they should be bundled and tested in isolation to ensure the I'll discuss this one with the team and we'll decide how to proceed, thank you for taking the time to explain your reasoning |
Awesome, thanks for your understanding and the thoughtful dialogue. Let me know if I can help you or the team chat through anything 🙏 |
No description provided.