-
Notifications
You must be signed in to change notification settings - Fork 221
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
Why does the generate command cache the OpenAPI description? #3316
Comments
Hi @pschaeflein, Kiota is only caching files loaded over the network (https scheme), local files are being read directly. The hash is orthogonal, once we have the file, it skips re-generating if the description hasn't changed. But we need to have the description first. Of course the assumption breaks down if you're editing the API definition at the same time, which I think is what you're doing. Can you tell me more about your workflow? Do you have the service also running locally? are you generating from a description that's "hosted" on localhost? Maybe we could/should skip caching for anything that comes from localhost. |
Yes. Reasonable.
Yes, exactly. Reading from localhost:
I like that idea. (Of course, now that I know what's happening, I just include the flag. 😏) When using the VSCode extension, perhaps a tickbox to force the download (the equivalent to --cc)? Thanks! |
Thanks for the additional information. I think the localhost improvement is contained enough that we can schedule it. The vscode extension relies on the same exact engine under the covers, so it's going to benefit from that improvement too. As for the settings, we haven't designed setting for the extension but this (and --co, and others), could be part of those settings. The nice thing about vscode settings is they can be global (for the user) or local (for the workspace), enabling consistency across developers on a single repository. We'll let demand drive those investments for now. |
authored #3317 to implement the localhost change |
Fix (working as I want) in the VSCode extension v1.7.23092101. Thanks! |
Thanks for confirming! |
When I run generate, it creates a lock file with a hash of the description.
It seems that it also caches the description.
Subsequent runs of generate don't update anything unless the --cc option is included.
Why cache? If I'm running generate, it is most likely because I've changed the OpenAPI description of the API and I want the client updated.
The text was updated successfully, but these errors were encountered: