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

Cache issues #41

Closed
Gregoirevda opened this issue Jun 25, 2018 · 3 comments
Closed

Cache issues #41

Gregoirevda opened this issue Jun 25, 2018 · 3 comments

Comments

@Gregoirevda
Copy link

Reproduction:

  • yarn send-introspection-query api-url-X
  • write queries -> passes
  • yarn send-introspection-query api-url-Y (doesn't contains queries or mutations of API X)
  • yarn start -> still working
  • bsb -clean-world -> still working
  • changing the query -> recognise the different graphql_schema.json

In general, you see that the graphql_schema.json is cached in the ppx. Only a query change will trigger the new schema

@mhallin
Copy link
Owner

mhallin commented Jun 25, 2018

Yes, this is an unfortunate side-effect when a PPX depends on other files than the input source file itself. Changing graphql_schema.json requires a bsb -clean-world -make-world to fully take effect. I'll add this to the readme.

This is similar to #13.

@Gregoirevda
Copy link
Author

Does it mean the ppx isn't executed if only another piece of code is changed?

@mhallin
Copy link
Owner

mhallin commented Jun 26, 2018

That's correct. A ppx is executed when the compiler compiles a file, which only happens when either that file or any of its dependencies - i.e. other .ml/.re files - have changed.

This basically means that ppx's never should read other files than their input. What you're seeing here is what happens when you break that rule :)

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

No branches or pull requests

2 participants