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

pruneGeneratedFiles is incorrectly deleting files #2665

Closed
calvincestari opened this issue Nov 15, 2022 · 4 comments
Closed

pruneGeneratedFiles is incorrectly deleting files #2665

calvincestari opened this issue Nov 15, 2022 · 4 comments
Assignees
Labels
awaiting response bug Generally incorrect behavior codegen Issues related to or arising from code generation

Comments

@calvincestari
Copy link
Member

Created from #2546 and comment #2546 (comment).

@calvincestari calvincestari added this to the Release 1.0.4 milestone Nov 15, 2022
@calvincestari calvincestari added bug Generally incorrect behavior codegen Issues related to or arising from code generation labels Nov 15, 2022
@calvincestari calvincestari added the planned-next Slated to be included in the next release label Jan 5, 2023
@AnthonyMDev
Copy link
Contributor

@SilverTab @pchmelar We have still been unable to reproduce the deletion of the files, as we spoke about in #2546. I'm wondering if other fixes we've made since than have inadvertently resolved this issue as well.

Could one of you try turning pruneGeneratedFiles back to true and see if it still deletes the wrong files with the latest version of the CLI?

@AnthonyMDev AnthonyMDev added awaiting response and removed planned-next Slated to be included in the next release labels Jan 5, 2023
@pchmelar
Copy link

Looks good in 1.0.6 🎉 Thank you!
MateeDevs/devstack-native-app#55

@calvincestari
Copy link
Member Author

Thanks for following up @pchmelar, I'm going to close out this issue now.

If it recurs please do come back to this issue and we'll take up the search again - thanks.

@calvincestari
Copy link
Member Author

Here's some additional debugging from a customer recently:

I think I had found the potential root cause of the issue.
in configs file we were setting the following

"output" : {
    .
    .
    .
    "operations" : {
      "relative" : {
        "subpath" : "./GraphQLOperations"
      }
    }
  },

I think defining the subpath of relative mode for operations files starting with ./ was causing this issue (it was working fine t generate operations models at expected subpath, but on regeneration I think some unexpected behaviour happens and fails to match operation files to query files).
changing to "subpath" : "GraphQLOperations" fixing the issue without the need to disable pruneGeneratedFiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response bug Generally incorrect behavior codegen Issues related to or arising from code generation
Projects
None yet
Development

No branches or pull requests

3 participants