-
Notifications
You must be signed in to change notification settings - Fork 471
Fix rewatch compilation of file starting with a lowercase letter #7700
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
058f6a1
add file-casing test repo to rewatch tests
tsnobip 6ee8d2c
Update expected files
nojaf 3aadd80
Try legacy behaviour
nojaf 0c0826a
Revert "Try legacy behaviour"
nojaf ddd3fb3
fix dev container
tsnobip 3a8dfdf
use the right version of nodejs in dev container
tsnobip 5eb8580
add a test repo for lowercase file with no namespace
tsnobip de3da74
fix compilation of files starting with lowercase letter
tsnobip 7efca9c
format rust
tsnobip 9233569
update snapshots
tsnobip 63a23b2
update changelog
tsnobip 27018fd
update expected files
tsnobip 0615cc3
update changelog
tsnobip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
*~ | ||
_build | ||
*.obj | ||
*.out | ||
*.compile | ||
*.native | ||
*.byte | ||
*.cmo | ||
*.annot | ||
*.cmi | ||
*.cmx | ||
*.cmt | ||
*.cmti | ||
*.cma | ||
*.a | ||
*.cmxa | ||
*.obj | ||
*~ | ||
*.annot | ||
*.mj | ||
*.bak | ||
*.swp | ||
*.swo | ||
*.flambda | ||
*.jsx | ||
*.lambda | ||
*.rawlambda | ||
*.s | ||
*.o | ||
*.lam | ||
*.0.js | ||
*# | ||
*.log | ||
.#* | ||
*.cmj | ||
*.rawlambda | ||
*.lambda | ||
*.zip | ||
*.mlast | ||
*.mliast | ||
|
||
.idea | ||
.DS_Store | ||
|
||
node_modules | ||
*.dump | ||
coverage | ||
|
||
.ninja_log | ||
.bsdeps | ||
.bsbuild | ||
lib/ocaml | ||
tests/build_tests/*/lib/ | ||
#ignore temporary directory | ||
*.goog.js | ||
*.jsoo.js | ||
*.so | ||
tmp/ | ||
tracing*.json | ||
|
||
_opam | ||
|
||
.env | ||
playground/packages/ | ||
playground/stdlib/ | ||
playground/*.cmj | ||
playground/*.cmi | ||
playground/.netrc | ||
playground/compiler.*js | ||
|
||
rewatch/target/ | ||
rewatch/rewatch | ||
|
||
tests/tools_tests/**/*.res.js | ||
tests/tools_tests/lib | ||
tests/analysis_tests*/lib | ||
tests/analysis_tests/**/*.bs.js | ||
|
||
/linux/*.exe | ||
/linuxarm64/*.exe | ||
/darwin/*.exe | ||
/darwinarm64/*.exe | ||
/win32/*.exe | ||
|
||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
*.tsbuildinfo | ||
|
||
# package tarballs | ||
package.tgz | ||
*.exe | ||
|
||
/ninja/ninja | ||
/ninja/build.ninja |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,14 @@ FROM mcr.microsoft.com/devcontainers/rust:1-1-bookworm | |
LABEL org.opencontainers.image.authors="Christoph Knittel <[email protected]>" | ||
LABEL org.opencontainers.image.description="Docker image for ReScript development." | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
yarn \ | ||
opam \ | ||
cmake \ | ||
ninja-build \ | ||
musl-tools \ | ||
python-is-python3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install OPAM | ||
ARG OPAM_VERSION=2.4.1 | ||
RUN printf '\n\n' | bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version $OPAM_VERSION" |
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
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
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
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
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
9 changes: 9 additions & 0 deletions
9
rewatch/testrepo/packages/file-casing-no-namespace/package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@testrepo/file-casing-no-namespace", | ||
"version": "0.0.1", | ||
"keywords": [ | ||
"rescript" | ||
], | ||
"author": "", | ||
"license": "MIT" | ||
} |
21 changes: 21 additions & 0 deletions
21
rewatch/testrepo/packages/file-casing-no-namespace/rescript.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@testrepo/file-casing-no-namespace", | ||
"sources": [ | ||
{ | ||
"dir": "src", | ||
"subdirs": true | ||
} | ||
], | ||
"package-specs": [ | ||
{ | ||
"module": "es6", | ||
"in-source": true | ||
} | ||
], | ||
"suffix": ".mjs", | ||
"dependencies": [], | ||
"compiler-flags": [], | ||
"jsx": { | ||
"version": 4 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
rewatch/testrepo/packages/file-casing-no-namespace/src/Consume.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Generated by ReScript, PLEASE EDIT WITH CARE | ||
|
||
import * as Produce from "./produce.mjs"; | ||
|
||
let x = Produce.meh(1); | ||
|
||
export { | ||
x, | ||
} | ||
/* x Not a pure module */ |
1 change: 1 addition & 0 deletions
1
rewatch/testrepo/packages/file-casing-no-namespace/src/Consume.res
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let x = Produce.meh(1) |
11 changes: 11 additions & 0 deletions
11
rewatch/testrepo/packages/file-casing-no-namespace/src/produce.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Generated by ReScript, PLEASE EDIT WITH CARE | ||
|
||
|
||
function meh(param) { | ||
return true; | ||
} | ||
|
||
export { | ||
meh, | ||
} | ||
/* No side effect */ |
3 changes: 3 additions & 0 deletions
3
rewatch/testrepo/packages/file-casing-no-namespace/src/produce.res
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let meh = (_: int) => { | ||
true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"name": "@testrepo/file-casing", | ||
"namespace": "FileCasing", | ||
"sources": [ | ||
{ | ||
"dir": "src", | ||
|
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
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
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
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
3 changes: 2 additions & 1 deletion
3
rewatch/tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Cleaned 0/56 | ||
Cleaned 0/60 | ||
Parsed 1 source files | ||
Compiled 0 modules | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Cleaned 1/56 | ||
Cleaned 1/60 | ||
Parsed 0 source files | ||
Compiled 1 modules | ||
|
||
|
Oops, something went wrong.
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.
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.
this is the fix