Skip to content

Errors regarding devMode and prodMode on Windows OS #737

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

Open
mathsgod opened this issue Mar 13, 2025 · 3 comments
Open

Errors regarding devMode and prodMode on Windows OS #737

mathsgod opened this issue Mar 13, 2025 · 3 comments

Comments

@mathsgod
Copy link

I've discovered that errors occur in DEV MODE while testing in a PHP8.1 environment. For reference, please check my repository: https://github.com/mathsgod/graphqlite-test.

The same QUERY that results in an error in DEV MODE does not produce errors in prod modes.

When the cache is cleared, the first EXECUTE QUERY runs successfully and returns the correct result. However, subsequent executions of the same QUERY, when the cache is present, result in an ERROR.

I am considering whether the issue could be related to the use of Symfony cache or other potential causes.

I think the cache in GlobControllerQueryProvider is causing it to not find the QUERY's controller, which leads to this ERROR.

@oprypkhantc
Copy link
Contributor

Cannot reproduce that.

Image

I've made sure that cache is saved by setting a directory: $cache = new Psr16Cache(new FilesystemAdapter(directory: '/app/cache/dev'));, and ran it with docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 php devmode.php. Running it multiple times does generate cache, but always results in the same output.

@mathsgod
Copy link
Author

mathsgod commented Mar 14, 2025

Indeed, I had no issues when testing in the LINUX environment (php8.2). I discovered that this problem only occurs in the WINDOWS environment. I also tested the same thing on another WINDOWS computer and changed the cache directory. In the cache folder, there were cache files, but the output still showed the same error.

Image

@oojacoboo oojacoboo changed the title Errors regarding devMode and prodMode Errors regarding devMode and prodMode on Windows OS Mar 14, 2025
@oprypkhantc
Copy link
Contributor

Possibly has something to do with path handling in these namespaces, but that's just guessing: https://github.com/thecodingmachine/graphqlite/tree/master/src/Cache
https://github.com/thecodingmachine/graphqlite/tree/master/src/Discovery

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