[Merged by Bors] - Use the IO.FS.rename to move file instead of relying on presence of mv program#6284
Closed
MohanadAhmed wants to merge 2 commits intomasterfrom
Closed
[Merged by Bors] - Use the IO.FS.rename to move file instead of relying on presence of mv program#6284MohanadAhmed wants to merge 2 commits intomasterfrom
MohanadAhmed wants to merge 2 commits intomasterfrom
Conversation
digama0
reviewed
Aug 2, 2023
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Aug 2, 2023
…v program (#6284) The Cache program after detecting that LeanTar is old downloads it and attempts to place it in the `CACHEDIR` directory. It then attempts to rename it using the `mv` command it assumes is present on the platform. On windows `cmd` and `powershell` this does not work since `mv` is actually a shell built in and not an executable. (This will however work on MinGW based shells). @digama0 added the function `IO.FS.rename` in Lean [Lean4#2345](leanprover/lean4#2345 (comment)) which calls the standard C/C++ function `rename`. This PR uses this function to move leantar instead of the runCmd command. When this fix succeeds the output looks like the following (in powershell). ```text PS W:\LeanStuff\graveyard_mathlib4\LeanCacheFix> lake exe cache get leantar is too old; downloading more recent version Attempting to download 3614 file(s) Downloaded: 3614 file(s) [attempted 3614/3614 = 100%] (100% success) Decompressing 3614 file(s) unpacked in 323 ms ``` Co-authored-by: Mario Carneiro <di.gama@gmail.com>
|
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
kim-em
pushed a commit
that referenced
this pull request
Aug 3, 2023
…v program (#6284) The Cache program after detecting that LeanTar is old downloads it and attempts to place it in the `CACHEDIR` directory. It then attempts to rename it using the `mv` command it assumes is present on the platform. On windows `cmd` and `powershell` this does not work since `mv` is actually a shell built in and not an executable. (This will however work on MinGW based shells). @digama0 added the function `IO.FS.rename` in Lean [Lean4#2345](leanprover/lean4#2345 (comment)) which calls the standard C/C++ function `rename`. This PR uses this function to move leantar instead of the runCmd command. When this fix succeeds the output looks like the following (in powershell). ```text PS W:\LeanStuff\graveyard_mathlib4\LeanCacheFix> lake exe cache get leantar is too old; downloading more recent version Attempting to download 3614 file(s) Downloaded: 3614 file(s) [attempted 3614/3614 = 100%] (100% success) Decompressing 3614 file(s) unpacked in 323 ms ``` Co-authored-by: Mario Carneiro <di.gama@gmail.com>
kim-em
pushed a commit
that referenced
this pull request
Aug 3, 2023
…v program (#6284) The Cache program after detecting that LeanTar is old downloads it and attempts to place it in the `CACHEDIR` directory. It then attempts to rename it using the `mv` command it assumes is present on the platform. On windows `cmd` and `powershell` this does not work since `mv` is actually a shell built in and not an executable. (This will however work on MinGW based shells). @digama0 added the function `IO.FS.rename` in Lean [Lean4#2345](leanprover/lean4#2345 (comment)) which calls the standard C/C++ function `rename`. This PR uses this function to move leantar instead of the runCmd command. When this fix succeeds the output looks like the following (in powershell). ```text PS W:\LeanStuff\graveyard_mathlib4\LeanCacheFix> lake exe cache get leantar is too old; downloading more recent version Attempting to download 3614 file(s) Downloaded: 3614 file(s) [attempted 3614/3614 = 100%] (100% success) Decompressing 3614 file(s) unpacked in 323 ms ``` Co-authored-by: Mario Carneiro <di.gama@gmail.com>
kim-em
pushed a commit
that referenced
this pull request
Aug 14, 2023
…v program (#6284) The Cache program after detecting that LeanTar is old downloads it and attempts to place it in the `CACHEDIR` directory. It then attempts to rename it using the `mv` command it assumes is present on the platform. On windows `cmd` and `powershell` this does not work since `mv` is actually a shell built in and not an executable. (This will however work on MinGW based shells). @digama0 added the function `IO.FS.rename` in Lean [Lean4#2345](leanprover/lean4#2345 (comment)) which calls the standard C/C++ function `rename`. This PR uses this function to move leantar instead of the runCmd command. When this fix succeeds the output looks like the following (in powershell). ```text PS W:\LeanStuff\graveyard_mathlib4\LeanCacheFix> lake exe cache get leantar is too old; downloading more recent version Attempting to download 3614 file(s) Downloaded: 3614 file(s) [attempted 3614/3614 = 100%] (100% success) Decompressing 3614 file(s) unpacked in 323 ms ``` Co-authored-by: Mario Carneiro <di.gama@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Cache program after detecting that LeanTar is old downloads it and attempts to place it in the
CACHEDIRdirectory. It then attempts to rename it using themvcommand it assumes is present on the platform. On windowscmdandpowershellthis does not work sincemvis actually a shell built in and not an executable. (This will however work on MinGW based shells).@digama0 added the function
IO.FS.renamein Lean Lean4#2345 which calls the standard C/C++ functionrename. This PR uses this function to move leantar instead of the runCmd command. When this fix succeeds the output looks like the following (in powershell).