Skip to content
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

Install Data Query dependency with Grid #143

Closed
burkeholland opened this issue Dec 21, 2016 · 8 comments
Closed

Install Data Query dependency with Grid #143

burkeholland opened this issue Dec 21, 2016 · 8 comments
Labels

Comments

@burkeholland
Copy link

burkeholland commented Dec 21, 2016

Right now, the Kendo UI Grid depends on the kendo-data-query package in order to work. This is listed in the docs, but easy to look over. It seems more logical the Grid would resolve and install it's own dependencies.

I'm sure there is a good reason why this doesn't work that way already that I simply don't understand.

@burkeholland burkeholland changed the title Install dependencies with post install script Install Data Query dependency with Grid Dec 21, 2016
@rkonstantinov
Copy link

The kendo-data-query package is not proprietary to the Grid. The intention is that it could be used separately or with other components. This is why it is set as a peer-dependency. Think something like rxjs package ;)

@tsvetomir
Copy link
Member

Still, we can update the Installation article to include the @progress/kendo-data-query package. Otherwise it would be too easy to miss.

@burkeholland
Copy link
Author

burkeholland commented Dec 22, 2016

In my experience, the Grid won't function without the kendo-data-query package. With the Angular CLI, webpack will throw an error both on the CLI and in the browser. Is the Grid expected to function without the data query package?

@tsvetomir
Copy link
Member

tsvetomir commented Dec 22, 2016

No, the Grid is not expected to function without it. You'll get a UNMET PEER DEPENDENCY if it's not installed or with the correct version.

The Getting Started article has been updated to the following installation command:
npm install --save @progress/kendo-angular-grid @progress/kendo-data-query

P.S. It's not published yet.

@burkeholland
Copy link
Author

If the Grid won't work without the data-query package, it seems like it should be a child dependency instead of a peer. I worry that developers will fall into the same mistake I did which is assuming that the grid is broken instead of reading the docs.

@tsvetomir
Copy link
Member

We can't give up the semantics of peer dependencies for what is essentially an usability issue of NPM itself. In fact, NPM < 3 used to install these automatically. Future versions might address this. Yarn might do that as well.

Marking kendo-data-query and similar packages, such as kendo-drawing as direct dependencies is certainly a possibility. It will solve the problem you're having, but will create scenarios where you load multiple concurrent versions of these dependencies. This is most certainly not what the user wanted.

We must not forget that NPM is a Node package manager - having multiple copies loaded is perfectly fine in Node, not so much in the browser.

@burkeholland
Copy link
Author

I understand now. Thank you for the schooling there on NPM. I suppose the best we can do in the meantime is make it overly and abundantly clear in the documentation that you need to have the data-query package.

Closing for now as I think this has been sufficiently discussed.

@tsvetomir
Copy link
Member

Using Yarn shouldn't be a problem with #712 in effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants