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

Circular import breaks building with Google Closure Compiler #1275

Closed
Jannis opened this issue Mar 6, 2018 · 2 comments · Fixed by #1276
Closed

Circular import breaks building with Google Closure Compiler #1275

Jannis opened this issue Mar 6, 2018 · 2 comments · Fixed by #1276

Comments

@Jannis
Copy link

Jannis commented Mar 6, 2018

There is a circular dependency between type/definition.js and type/wrappers.js, which breaks building graphql-js with the Google Closure Compiler (which has no solution to breaking circular imports yet, see this issue).

The affected code is located here:

https://github.com/graphql/graphql-js/blob/master/src/type/definition.js#L35

and

https://github.com/graphql/graphql-js/blob/master/src/type/wrappers.js#L10-L11

Any chance we could break this cycle? Among other things, it would allow to include graphql-js seamlessly in ClojureScript via its new :npm-deps feature.

@Jannis Jannis changed the title Cyclic import breaks building with Google Closure Compiler Circular import breaks building with Google Closure Compiler Mar 6, 2018
@IvanGoncharov
Copy link
Member

The simplest solution would be to just merge wrappers.js into definitions.js.
Or we can minimize changes somehow?

@Jannis Do you want to work on this PR?

@Jannis
Copy link
Author

Jannis commented Mar 6, 2018

@IvanGoncharov Sure, I can cook something up.

Jannis pushed a commit to Jannis/graphql-js that referenced this issue Mar 6, 2018
This fixes graphql#1275 by avoiding circular imports between the two modules.
Jannis pushed a commit to Jannis/graphql-js that referenced this issue Mar 6, 2018
Jannis pushed a commit to Jannis/graphql-js that referenced this issue Mar 6, 2018
Jannis pushed a commit to Jannis/graphql-js that referenced this issue Mar 6, 2018
Jannis pushed a commit to Jannis/graphql-js that referenced this issue Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants