-
Notifications
You must be signed in to change notification settings - Fork 81
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
enable users to prepare the flutter engine within docker image without building first. #214
Conversation
I'm getting a 404 error when I attempt to see why this failed and as such I'm not able to fix it. When I run tests on my own machine, failures seem to occur because of line ending differences within sections of the project which this pull request does not touch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> [hover 29/30] RUN hover prepare-engine --all:
#47 1.058 hover: Downloading engine for platform linux-release at version a9d88a4d182bdae23e3a4989abfb7ea25954aad1...
Download completed in 1.75s
#47 4.724 hover: Downloading engine for platform windows-release at version a9d88a4d182bdae23e3a4989abfb7ea25954aad1...
Download completed in 1.42s
#47 8.362 hover: Downloading engine for platform darwin-release at version a9d88a4d182bdae23e3a4989abfb7ea25954aad1...
Download completed in 1.30s
#47 10.64 hover: install_name_tool failed: exec: "darling": executable file not found in $PATH
#47 10.64 hover:
I think you should remove the preparation of the darwin release engine, because it's not possible to cross compile darwin release from linux using docker. The build command already stops users from doing that.
So you should switch darwin release to debug, but I think windows and linux should also get the debug engine.
Dockerfile
Outdated
@@ -121,4 +121,8 @@ RUN go install -v ./... 2>&1 | |||
|
|||
COPY docker/hover-safe.sh /usr/local/bin/hover-safe.sh | |||
|
|||
# Prepare engines | |||
RUN hover prepare-engine --all | |||
ENV CGO_LDFLAGS="-L/.cache/hover/engine/linux-release -L~/.cache/hover/engine/windows-release -L~/.cache/hover/engine/darwin-release" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are missing a ~
for linux
In the end those engines should get prepared:
|
I also have engines:
and
But I think that an older version of hover. |
Only the ones in |
@jld3103 what do you think of the addition of this new command
😅 |
@jld3103 @cosban do you have the same error:
|
Yeah I think a leaner image would be better, especially because the cache is mounted so they won't be downloaded every time. |
No, I just built it from scratch and it worked. |
Okay, I might have a proxy error. |
@cosban You have add some code so that darwin release only gets downloaded when running on darwin or on linux where darling is installed. You can probably use the code from Lines 346 to 375 in 9f74033
|
Maybe making a common function for it is also a possibility, but idk |
Ah well only using debug engines would also work, but then you need to change the path in the CGO_LDFLAGS too. |
sounds good to me. I'll also remove the --all flag. |
It is not necessary for the validation step be copied over. It seems that the only required check from this portion is to see whether the user is trying to prepare the darwin-release engine while not on darwin, while also not having darling in the path. |
remove the prepare step within the docker image, users can prepare which ever engines they need on the fly add all supported engines to the CGO_LDFLAGS of the docker image
Is there a reason the docker image is not based on alpine if this is the case? https://hub.docker.com/_/alpine/ |
Back then there was no alpine image with golang-cross capabilities. Maybe there is one now |
that's as good of a reason as any other 🤣 |
I will review this properly when I have time. Sorry :( |
no worries. |
Not to rush you or anything, but is there an ETA for looking at this? Would another person be able to review it before you have free time? |
I will review it on the 20th. Sorry I'm currently busy. @pchampio could also do the review, if he wants to. |
FIX: ensure exactly one mode is set at a time
LGTM, you can drop the last commit if you want to and I'll merge |
I think it's fine. better to be consistent with the methodology anyway. |
Tagged as v0.46.5 |
Fixes #598
For the details of why this pull request was made, see go-flutter-desktop/go-flutter#598