Skip to content

Commit

Permalink
Fix gentype
Browse files Browse the repository at this point in the history
but now we have another circular dependency 😅 need to wait the `@rescript/react` release

See rescript-lang/rescript-react#115
  • Loading branch information
cometkim committed May 26, 2024
1 parent 1a47463 commit 61d9988
Show file tree
Hide file tree
Showing 151 changed files with 6 additions and 4,053 deletions.
6 changes: 1 addition & 5 deletions jscomp/gentype/GenTypeConfig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,9 @@ let setDebug ~gtconf =
| _ -> ()

let compilerConfigFile = "rescript.json"
let legacyCompilerConfigFile = "bsconfig.json"

let rec findProjectRoot ~dir =
if
Sys.file_exists (Filename.concat dir compilerConfigFile)
|| Sys.file_exists (Filename.concat dir legacyCompilerConfigFile)
then dir
if Sys.file_exists (Filename.concat dir compilerConfigFile) then dir
else
let parent = dir |> Filename.dirname in
if parent = dir then (
Expand Down
6 changes: 1 addition & 5 deletions jscomp/gentype/Paths.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ let getConfigFile ~projectRoot =
let config = concat projectRoot Config.compilerConfigFile in
match config |> Sys.file_exists with
| true -> Some config
| false -> (
let config = concat projectRoot Config.legacyCompilerConfigFile in
match config |> Sys.file_exists with
| true -> Some config
| false -> None)
| false -> None

let readConfig ~namespace = Config.readConfig ~getConfigFile ~namespace

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions jscomp/gentype_tests/typescript-react-example/src/Comments.gen.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions jscomp/gentype_tests/typescript-react-example/src/Comments.res.js

This file was deleted.

72 changes: 0 additions & 72 deletions jscomp/gentype_tests/typescript-react-example/src/Core.gen.tsx

This file was deleted.

133 changes: 0 additions & 133 deletions jscomp/gentype_tests/typescript-react-example/src/Core.res.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit 61d9988

Please sign in to comment.