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

Strawberry Shake's generated code does not handle custom output directory properly. #5532

Closed
1 task done
kellyrbourg opened this issue Nov 4, 2022 · 4 comments
Closed
1 task done
Assignees
Labels
Milestone

Comments

@kellyrbourg
Copy link

kellyrbourg commented Nov 4, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Our repo is setup as follows. (We are using NX for managing build orchestration/targets/dependencies/artifacts). We have a custom output directory set in our root Directory.Build.props that is set to an absolute path. (/home/krbourg/code/alloy/dist)

/dist/libs/shared/infrastructure/strawberry-shake-server-client/bin/*
/dist/libs/shared/infrastructure/strawberry-shake-server-client/obj/*
/libs/share/infrastructure/strawberry-shake-server-client
/Directory.Build.props

We are seeing the Strawberry Shake code generation output files to the following location:
/libs/shared/infrastructure/strawberry-shake-server-client/home/krbourg/work/code/alloy/dist/libs/shared/infrastructure/strawberry-shake-server-client
It seems to be taking our absolute path, and treating it as if it should be relative to the project directory.

Steps to reproduce

  1. Create new dotnet project within a nested folder and add strawberry shake + schema/operations. (We used StrawberryShake.Server & StrawberryShake.Tool)
  2. Add a Directory.Build.props file to the root directory and specify an absolute path for the <BaseIntermediateOutputPath> property.
  3. Build project and observe the code generated relative to the project directory.

Relevant log output

No response

Additional Context?

No response

Product

Strawberry Shake

Version

13.0.0-preview.76

@kellyrbourg kellyrbourg added the 🐛 bug Something isn't working label Nov 4, 2022
@kellyrbourg kellyrbourg changed the title Strawberry Shake's generated code does handle custom output directory properly. Strawberry Shake's generated code does not handle custom output directory properly. Nov 4, 2022
@michaelstaib michaelstaib added this to the HC-13.0.0 milestone Nov 7, 2022
@michaelstaib
Copy link
Member

Thanks for reporting!

@AlexandraChibisov
Copy link

Hi, I'd love to take a look at this one! Does anyone have any knowledge at which files/docs I should read up on to start out?

@michaelstaib
Copy link
Member

@AlexandraChibisov this should be a simple one. I can walk you through in our zoom call.

@michaelstaib
Copy link
Member

Fixed with #5770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants