-
Notifications
You must be signed in to change notification settings - Fork 199
Switch grails-datastore-gorm-test back to api so SimpleMapDatastore can be found in test #1875
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
Conversation
…an be found in test
|
I'm doing cleanup in downstream projects like grails-cache and noticed that they are failing to compile. It's because the SimpleMapDatstore is no longer being exported like it was before. I'm going to go ahead and merge this change since it's a revert of an earlier change. @matrei please let me know if you disagree with this and we can discuss. |
|
@jdaugherty Hmm 🤔, why don't we add Or should perhaps |
|
I think the idea of it being separate is people can include it as a simple datastore implementation if they don't want a full datastore implementation. Otherwise, it would have been merged into the testing support library. It's reasonable to subdivide a project so it's used by default in test, and can be used by others outside of test without the test code. |
|
I also disagree on adding it as a direct dependency since historically it's always been included. It's actually required for unit tests, so I don't see a case where we wouldn't always include it with test - so it should stay api. |
|
I don't think it is required as a compile time dependency for unit tests. In that case we would have noticed failures everywhere. However, it is being included as a runtime dependency by being |
|
I actually use |
|
Have we actually confirmed it's working for Domain Unit tests? I suspect it's not given that they were failing to compile in the grails cache project. i don't see any functional tests that demonstrate this usage inside this project. Changing to api fixed those tests. |
If you look in the
From my point of view, with the info I have now, the correct thing to do is rename |
|
Concerning the naming, I agree we should rename it so it's clear on the purpose of the library. Concerning the combining, because it can be used for other purposes (and even has per Scott), we shouldn't combine it. Concerning the dependency split, I don't agree for multiple reasons:
It pulls in the data mapping projects because it's the only option. The same should apply here. |
👍
Agree, there are use cases outside testing.
This is why there are different scopes to begin with. Not every transitive dependency of a library should be added to the
And, in my view, it is an implementation detail that should not be leaked to the compile classpath of consumers.
We are only requiring people to add dependencies they are directly depending on (which is a good thing). If we want to, we can create "dependency aggregators (starters)" for the app level to simplify (hide) dependency management for end users, but I think the dependency chains at at the framework level should be correct.
Actually, I think we do. Now, one could argue that Grails Plugins could/should act as aggregators, and some actually do. Like |
I consider this part of the testing public api though. If you want to check the state it ended up in the datastore, you have to inject it. Which means if you're typing, you'll want that class on your classpath.
I don't view it as an implementation detail since it's being used in tests.
I'd argue with testing this should be an aggregator. the gorm-testing-support library is everything related to testing gorm.
I consider this one of those cases. Normally this library would have been apart of the testing library and naturally exposed by being in the same library. The only reason it's not is so other people can use it outside of test. |
|
Looking at
I don't understand how you mean here. Could you show me a use case, maybe I'll grok why you want this change.
I'm not against setting up aggregators. But libraries are not aggregators. I think aggregators should only aggregate. |
No description provided.