-
Notifications
You must be signed in to change notification settings - Fork 469
Ignore self-cycles on bsb_helper to suppress false positives #5393
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
cristianoc
merged 6 commits into
rescript-lang:master
from
cannorin:5368-ignore-self-cycles
Jun 8, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3499809
Ignore self-cycles
cannorin a77da2e
build_tests/cycle: check .compiler.log too
cannorin b587186
Update the bundled ninja
cannorin d874477
add jscomp/build_tests/cycle1
cannorin fa82f06
jscomp/build_tests/zerocycle: assert success
cannorin 1d64828
jscomp/build_tests/zerocycle: link the original issue
cannorin 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
Binary file not shown.
Binary file not shown.
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,7 +1,13 @@ | ||
//@ts-check | ||
var cp = require("child_process"); | ||
var assert = require("assert"); | ||
const cp = require("child_process"); | ||
const assert = require("assert"); | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
var output = cp.spawnSync(`rescript`, { encoding: "utf8", shell: true }); | ||
|
||
assert(/dependency cycle/.test(output.stdout)); | ||
|
||
var compilerLogFile = path.join(__dirname, 'lib', 'bs', '.compiler.log'); | ||
var compilerLog = fs.readFileSync(compilerLogFile, 'utf8'); | ||
assert(/dependency cycle/.test(compilerLog)); |
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,26 @@ | ||
*.exe | ||
*.obj | ||
*.out | ||
*.compile | ||
*.native | ||
*.byte | ||
*.cmo | ||
*.annot | ||
*.cmi | ||
*.cmx | ||
*.cmt | ||
*.cmti | ||
*.cma | ||
*.a | ||
*.cmxa | ||
*.obj | ||
*~ | ||
*.annot | ||
*.cmj | ||
*.bak | ||
lib/bs | ||
*.mlast | ||
*.mliast | ||
.vscode | ||
.merlin | ||
.bsb.lock |
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,16 @@ | ||
|
||
|
||
# Build | ||
``` | ||
npm run build | ||
``` | ||
|
||
# Watch | ||
|
||
``` | ||
npm run watch | ||
``` | ||
|
||
|
||
# Editor | ||
If you use `vscode`, Press `Windows + Shift + B` it will build automatically |
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,14 @@ | ||
{ | ||
"name": "cycle1", | ||
"namespace": true, | ||
"version": "0.1.0", | ||
"sources": { | ||
"dir" : "src", | ||
"subdirs" : true | ||
}, | ||
"package-specs": { | ||
"module": "es6", | ||
"in-source": true | ||
}, | ||
"suffix": ".bs.js" | ||
} |
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,13 @@ | ||
//@ts-check | ||
const cp = require("child_process"); | ||
const assert = require("assert"); | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
var output = cp.spawnSync(`rescript`, { encoding: "utf8", shell: true }); | ||
|
||
assert(/is dangling/.test(output.stdout)); | ||
|
||
var compilerLogFile = path.join(__dirname, 'lib', 'bs', '.compiler.log'); | ||
var compilerLog = fs.readFileSync(compilerLogFile, 'utf8'); | ||
assert(/is dangling/.test(compilerLog)); |
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,17 @@ | ||
{ | ||
"name": "cycle1", | ||
"version": "0.1.0", | ||
"scripts": { | ||
"clean": "rescript clean", | ||
"build": "rescript build", | ||
"watch": "rescript build -w" | ||
}, | ||
"keywords": [ | ||
"ReScript" | ||
], | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"rescript": "^10.0.0" | ||
} | ||
} |
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 @@ | ||
include A | ||
|
||
let x = 42 |
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 : int |
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,3 +1,4 @@ | ||
var p = require("child_process"); | ||
var assert = require("assert"); | ||
p.spawnSync(`rescript`, { encoding: "utf8", cwd: __dirname }); | ||
var out = p.spawnSync(`rescript`, { encoding: "utf8", cwd: __dirname }); | ||
assert(out.status == 0) |
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,14 @@ | ||
// one-file false positive: https://github.com/rescript-lang/rescript-compiler/issues/5368 | ||
|
||
module Nested = { | ||
module Bar = { | ||
type t = private int | ||
} | ||
} | ||
|
||
open Nested | ||
|
||
module Bar = { | ||
open Bar | ||
let t : t = Obj.magic(42) | ||
} |
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 @@ | ||
module Foo2 = {} |
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,2 @@ | ||
open Demo2 | ||
include Foo2 |
Binary file not shown.
Submodule ninja
updated
6 files
+48 −0 | .github/workflows/ci.yml | |
+10 −0 | .github/workflows/get_artifact_info.js | |
+13 −0 | createBinDir.js | |
+1 −5 | src/build.cc | |
+5 −5 | src/clean.cc | |
+13 −5 | src/ninja.cc |
Binary file not shown.
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.
Uh oh!
There was an error while loading. Please reload this page.