Conversation
weswigham
left a comment
There was a problem hiding this comment.
Just some nits; I like the new unified emit diff. It's nice - all the emit in one place, so I can associate all the outputs. We should consider swapping our other baselines to it, too (provided none of the test emit outputs are so large it's untenable).
| } | ||
| for (const dir of Harness.IO.getDirectories(localRoot)) { | ||
| loadFsMirror(vfs, localRoot + "/" + dir, virtualRoot + "/" + dir); | ||
| function patchResolver(resolver: vfs.FileSystemResolver): vfs.FileSystemResolver { |
There was a problem hiding this comment.
Is this absolutely necessary? The mounted files are lazily loaded now, right? And only diffs are in the output? What still depends on only these lib files being findable?
| "@types/minimist": "latest", | ||
| "@types/mkdirp": "latest", | ||
| "@types/mocha": "latest", | ||
| "@types/mocha": "^5.2.2", |
There was a problem hiding this comment.
Should probably still be latest.
|
|
||
| private static symlinkDiff(container: FileSet, basename: string, changedNode: SymlinkInode, baseNode: SymlinkInode) { | ||
| // no difference if the nodes are the same reference | ||
| if (changedNode.symlink === baseNode.symlink) return false; |
There was a problem hiding this comment.
If symlinks are interpreted as relative paths, should a symlink at /lib/foo of ../bar be equivalent to one at the same location of ../../lib/bar? Or am I mistaken?
There was a problem hiding this comment.
This compares symlinks in the same path, so you shouldn't run into this.
| private _unlinkBrand?: never; // brand necessary for proper type guards | ||
| } | ||
|
|
||
| // prevents compiler errors due to unused brand properties |
There was a problem hiding this comment.
Don't we have some _unlinkBrand?! or ["_unlinkBrand"] syntax variant that should more cleanly suppress that error? Or is that just definite assignment?
With the recent change to project references, @weswigham and I noticed a few issues with sourcemap emit. To better diagnose these, I've added the ability to generate a diff between two virtual filesystems so that we can get a better idea of what changes we are making. This change will help diagnose source map paths in #24917.