You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS T:\> cd .\core\
PS T:\core> git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
PS T:\core> git diff
PS T:\core> moon fmt
PS T:\core> git diff
PS T:\core> git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Run moon info
PS T:\core> moon info
Finished. moon: ran 90 tasks, now up to date
PS T:\core> git diff
diff --git a/array/array.mbti b/array/array.mbti
index 85a269a..1efce1a 100644--- a/array/array.mbti
+++ b/array/array.mbti
@@ -1,77+1,77 @@
...
...
PS T:\core> git config core.autocrlf input
PS T:\core> git diff
warning: in the working copy of 'array/array.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'bool/bool.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'buffer/buffer.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'builtin/builtin.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'byte/byte.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'bytes/bytes.mbti', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'char/char.mbti', CRLF will be replaced by LF the next time Git touches it
Another way of reproducing:
PS T:\># Checkout with CRLF
PS T:\> git config --global core.autocrlf true
PS T:\> git clone https://github.com/moonbitlang/core.git core-crlf
Cloning into 'core-crlf'...
remote: Enumerating objects: 14680, done.
remote: Counting objects: 100% (1102/1102), done.
remote: Compressing objects: 100% (318/318), done.
remote: Total 14680 (delta 916), reused 790 (delta 784), pack-reused 13578 (from4)
Receiving objects: 100% (14680/14680),4.00 MiB |2.41 MiB/s, done.
Resolving deltas: 100% (10224/10224), done.
PS T:\> cd .\core-crlf\
PS T:\core-crlf> git diff
PS T:\core-crlf> git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Run moon info
PS T:\core-crlf> moon info
Finished. moon: ran 90 tasks, now up to date
PS T:\core-crlf> git diff
PS T:\core-crlf> git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Run moon fmt
PS T:\core-crlf> moon fmt
PS T:\core-crlf> git diff
warning: in the working copy of 'array/array.mbt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'array/array_js.mbt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'array/array_nonjs.mbt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'array/array_test.mbt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'array/blit.mbt', LF will be replaced by CRLF the next time Git touches it
I would recommend keeping the EOL unchanged, as users may be using platform-specific EOLs, or automatically switching EOLs at check-in, commit, etc. with tools like git.
Actual Behavior
moon fmt always generates LF as EOL on Windows.
moon info always generate CRLF as EOL on Windows.
Checklist
(Optional) My case is minimal enough to be reproducible.
The text was updated successfully, but these errors were encountered:
Bug Report
Environment
OS
Operating System: Windows 11 24H2
MoonBit CLI Tools Version
And I'm using dev version of core
1fae2a3
Steps to Reproduce
Using Pwsh, clone
moonbitlang/core
Run
moon fmt
Run
moon info
Another way of reproducing:
Run
moon info
Run
moon fmt
Expected Behavior
moon fmt
andmoon info
have the same behaviour.Both use LF, or CRLF, or are configurable, or keep EOL unchanged.
like https://github.com/rust-lang/rustfmt/blob/8a2c07398845420d7951d2f4e83d5f97c4df0875/src/config/options.rs#L20
I would recommend keeping the EOL unchanged, as users may be using platform-specific EOLs, or automatically switching EOLs at check-in, commit, etc. with tools like git.
Actual Behavior
moon fmt
always generates LF as EOL on Windows.moon info
always generate CRLF as EOL on Windows.Checklist
The text was updated successfully, but these errors were encountered: