-
Notifications
You must be signed in to change notification settings - Fork 112
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
Avoid hardcoded limit of 20 in projection evaluation #249
Comments
I see your point. Having it set to 20, I agree seam a bit arbitrary; it should probably rely on resources set for the specific resource. However, I think the Conf is on the correct package (It's configuring a resource), and moving it to a separate package doesn't really make sense. Besides, there are other issues with the current dependency tree that would make sense to solve at the same time. I.e. the query package is relying on It might be worthwhile reviewing the two packages PS! The schema package should not need depend on the |
I acknowledge the problem, but I think we need to come up with a better solution. I am thus going to close this issue now . Feel free to create a new issue with an alternate suggestion for restructuring. |
Closing is okay, but I feel that this is major issue, and should be addressed soon, before any major package refactoring. Currently I am using a fork of
It could have been superb if this validation especially can be turned ON/OFF via config. |
Let's reopen/rename it then; just doing a bit of a cleanup in the issue tracker. |
resource.Conf
to its own package
Ok I reopened #192 as well; I suppose we still need to track it. It's really a bug, not an enchantment. |
Thanks. I will think about it more, when I have some time. |
Here is a suggestion (breaking change) for solving the circular dependencies:
I would milestone this for a 0.3 release, if we can get #213 merged first so we can push out a release with that. |
Cool, thanks! Will dig around when have some time. I need to polish my circular dependency hell skills with Go :) |
Actually query is also used within resource (my bad). But maybe a query interface could be defined for use in the resource package? There are a few cases within the resource package where a query is actually defined though. Probably this approach also need some thought and cleaver work-arounds... |
Maybe the least invasive change would be to add a Then alter the existing resource wrapper types in the |
Hi there,
I want to propose a breaking API change, about moving
resource.Conf
ingithub.com/rs/rest-layer/resource
toconf.Conf
ingithub.com/rs/rest-layer/resource/conf
. The reason for this is that I want to use resource configuration inschema/query
package, that currently results in cyclic dependency.More specifically I want to remove this constant:
rest-layer/schema/query/projection_evaluator.go
Line 336 in 3f2cd5d
And use
conf.PaginationDefaultLimit
in connected resource.The text was updated successfully, but these errors were encountered: