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

fix: ./pubspec_overrides.yaml generated with \ on windows breaks docker build. #1116

Open
djkingCanada opened this issue Oct 18, 2023 · 3 comments
Labels
bug Something isn't working as expected p3 Issues that we currently consider unimportant

Comments

@djkingCanada
Copy link

I'm on windows (.net legacy projects, sigh) and have a shared module between my server and client using the path option. The build tool generates a ./pubspec_overrides.yaml using '' in the path.

'' is the platform separator so I suspect this is coming from code that is trying to be platform independent. The problem is this breaks the docker build as a path with \ is not a valid Linux path.

I'm thinking this could be an issue on mac with ':' being the system separator (I haven't tested this). Maybe we need a way to specify the target separator for the process?

I'm willing to help with this if someone could give me a place to start looking.

@djkingCanada djkingCanada added the bug Something isn't working as expected label Oct 18, 2023
@alestiago
Copy link
Contributor

alestiago commented Oct 23, 2023

Hi @djkingCanada! Thanks for submitting an issue.

I would like to reproduce the issue. Can you provide an enumerated list of steps to reproduce this issue?


I'm willing to help with this if someone could give me a place to start looking.

As a guess, this is probably related to the bundling process, you might want to take a look at the dart_frog_prod brick, see:

final externalDependencies = await createExternalPackagesFolder(

@alestiago alestiago added the waiting for response Waiting for follow up label Oct 23, 2023
@djkingCanada
Copy link
Author

@alestiago: All I did was run the build on a windows machine, that produces a docker file with \ used in the file paths and then when you try to use that docker file to build a Linux image things break.

@alestiago alestiago removed the waiting for response Waiting for follow up label Feb 6, 2024
@salim-lachdhaf
Copy link

I have the same issue.

to reproduce the issue:

  • use a local lib like this :
 shared:
       path: ../server/packages/shared
  • build : dart_frog build (on Windows) => this will generate pubspec_overrides.yaml file in the build directory.
    that contains :
dependency_overrides:
  shared:
    path: .dart_frog_path_dependencies\shared

you will notice that we have \ not /.

  • Deploy : to Cloud Run you will get this error:
    Because server depends on shared from path which doesn't exist (could not find package shared at ".dart_frog_path_dependencies\shared"), version solving failed.

@tomarra tomarra added the p3 Issues that we currently consider unimportant label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected p3 Issues that we currently consider unimportant
Projects
Status: Backlog
Development

No branches or pull requests

4 participants