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

[Makefile] Impossible to setup on Windows #8272

Closed
AlexV525 opened this issue Feb 16, 2023 · 4 comments
Closed

[Makefile] Impossible to setup on Windows #8272

AlexV525 opened this issue Feb 16, 2023 · 4 comments
Labels
auto.docker Bot updates to Docker code or config cl.duplicate Closes issue as duplicate of another issue devos.Windows Relates to developing apps on the Windows platform e1-hours Effort: < 8 hrs infra.structure Relates to the tools that create docs.flutter.dev p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged

Comments

@AlexV525
Copy link
Member

Describe the problem

website/Makefile

Lines 172 to 173 in 5494bf1

clean:
rm -rf _site .jekyll* src/.jekyll* *.log tmp .dart_tool

Since most of the commands start with clean, there is no way to run rm on Windows command lines.

C:\ProgramData\chocolatey\bin\make.exe -f X:\Coding\Garages\GitHub\flutter-website\Makefile -C X:\Coding\Garages\GitHub\flutter-website build
process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed.
X:\Coding\Garages\GitHub\flutter-website\Makefile:12: pipe: No error
make: Entering directory 'X:/Coding/Garages/GitHub/flutter-website'
make clean
make[1]: Entering directory 'X:/Coding/Garages/GitHub/flutter-website'
rm -rf _site .jekyll* src/.jekyll* *.log tmp .dart_tool
make[1]: Leaving directory 'X:/Coding/Garages/GitHub/flutter-website'
process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed.
Makefile:12: pipe: No error
process_begin: CreateProcess(NULL, rm -rf _site .jekyll* src/.jekyll* *.log tmp
.dart_tool, ...) failed.
make (e=2): 系统找不到指定的文件。
make[1]: *** [Makefile:153: clean] Error 2
make: *** [X:\Coding\Garages\GitHub\flutter-website\Makefile:135: build] Error 2
make: Leaving directory 'X:/Coding/Garages/GitHub/flutter-website'

Process finished with exit code 2

Expected fix

No response

Additional context

No response

@AlexV525 AlexV525 added the infra.structure Relates to the tools that create docs.flutter.dev label Feb 16, 2023
@AlexV525
Copy link
Member Author

AlexV525 commented Feb 16, 2023

Also, copying Flutter from the host will cause platform issues that unable to start any Flutter commands.

env: bash\r: No such file or directory

website/Dockerfile

Lines 27 to 28 in 5494bf1

# This Flutter install uses/requires the local ./flutter submodule
COPY ./flutter ./flutter

@atsansone atsansone added devos.Windows Relates to developing apps on the Windows platform auto.docker Bot updates to Docker code or config labels Jun 4, 2023
@parlough parlough added p2-medium Necessary but not urgent concern. Resolve when possible. e1-hours Effort: < 8 hrs st.triage.ltw Indicates Lead Tech Writer has triaged labels Jun 13, 2023
@atsansone
Copy link
Contributor

@AlexV525 : Your second issue is a Windows Git issue.

Check out this StackOverflow post that explains the issue.

TL;DR: Git translated UNIX line breaks to Windows line breaks on git clone. bash has no idea what to do with those line breaks.

$ git config --global core.autocrlf input

That ensured that all writes to git and GitHub use LF only.

$ git config --global core.autocrlf false

This ensures that all reads to git and GitHub use LF only.

A deeper dive can be found on this GitHub page.

@atsansone
Copy link
Contributor

Closing as duplicate of #6443.

@atsansone atsansone closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
@atsansone atsansone added the cl.duplicate Closes issue as duplicate of another issue label Aug 25, 2023
@AlexV525
Copy link
Member Author

@AlexV525 : Your second issue is a Windows Git issue.

It's unfriendly to ask users to reconfigure their global configurations if they're not unnecessary, like Git, if the step can be done to solve them externally.

parlough pushed a commit that referenced this issue Aug 26, 2023
`time` is not a valid command on Windows. This helps to setup the
environment on the Windows platform. We currently not monitoring the
built time so we can add it back once we have requests.

Issues fixed (partially) by this PR:

- #6443
- #8272
parlough added a commit that referenced this issue Sep 16, 2023
_Description of what this PR is changing or adding, and why:_
The PR removes the `flutter` repo as a submodule to avoid conflicts when
building the website on different platforms. It was first introduced in
#1257 but with no explanation so we cannot track back what's the
purpose, but removing this should not cause difficulties in maintaining
the website.

### Additional info

- The build process is slower than the previous one because the checkout
step needs an extra 3~5 minutes, depending on the network condition. See
[now](https://github.com/flutter/website/actions/runs/5985413443/job/16237673762?pr=9307)
and
[previous](https://github.com/flutter/website/actions/runs/5983398408/job/16237673076?pr=9298)
checks.

_Issues fixed (partially) by this PR (if any):_
- #6201
- #6443
- #8272

## Presubmit checklist

- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
@AlexV525 AlexV525 linked a pull request Sep 17, 2023 that will close this issue
3 tasks
atsansone pushed a commit to atsansone/website that referenced this issue Sep 19, 2023
`time` is not a valid command on Windows. This helps to setup the
environment on the Windows platform. We currently not monitoring the
built time so we can add it back once we have requests.

Issues fixed (partially) by this PR:

- flutter#6443
- flutter#8272
atsansone added a commit to atsansone/website that referenced this issue Sep 19, 2023
_Description of what this PR is changing or adding, and why:_
The PR removes the `flutter` repo as a submodule to avoid conflicts when
building the website on different platforms. It was first introduced in
flutter#1257 but with no explanation so we cannot track back what's the
purpose, but removing this should not cause difficulties in maintaining
the website.

### Additional info

- The build process is slower than the previous one because the checkout
step needs an extra 3~5 minutes, depending on the network condition. See
[now](https://github.com/flutter/website/actions/runs/5985413443/job/16237673762?pr=9307)
and
[previous](https://github.com/flutter/website/actions/runs/5983398408/job/16237673076?pr=9298)
checks.

_Issues fixed (partially) by this PR (if any):_
- flutter#6201
- flutter#6443
- flutter#8272

## Presubmit checklist

- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
atsansone added a commit that referenced this issue Sep 21, 2023
_Description of what this PR is changing or adding, and why:_
The PR removes the `flutter` repo as a submodule to avoid conflicts when
building the website on different platforms. It was first introduced in
#1257 but with no explanation so we cannot track back what's the
purpose, but removing this should not cause difficulties in maintaining
the website.

### Additional info

- The build process is slower than the previous one because the checkout
step needs an extra 3~5 minutes, depending on the network condition. See
[now](https://github.com/flutter/website/actions/runs/5985413443/job/16237673762?pr=9307)
and
[previous](https://github.com/flutter/website/actions/runs/5983398408/job/16237673076?pr=9298)
checks.

_Issues fixed (partially) by this PR (if any):_
- #6201
- #6443
- #8272

## Presubmit checklist

- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
Co-authored-by: Parker Lougheed <parlough@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto.docker Bot updates to Docker code or config cl.duplicate Closes issue as duplicate of another issue devos.Windows Relates to developing apps on the Windows platform e1-hours Effort: < 8 hrs infra.structure Relates to the tools that create docs.flutter.dev p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants