Skip to content
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

Revert changes to matchFiles/readDirectory made since 4.3 #46787

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Nov 11, 2021

Reverts #44710, #46086, and #46673.
Fixes #46577.

I have discovered that ts.matchFiles/ts.sys.readDirectory does a lot of extremely confusing things, none of which are documented and some of which are probably bugs, but nobody seemed to notice until we started messing with it, so I’m reverting back to our 4.3 state. I will post my findings of what’s weird even in 4.3 so we can decide if any of it is worth fixing (done: #46788).

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Nov 11, 2021
@andrewbranch andrewbranch requested a review from amcasey November 11, 2021 22:30
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this re-break the RWC tests?

@@ -1620,12 +1619,6 @@ namespace ts {
options = { persistent: true };
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand a full revert is safer at this point in the cycle, but it would be nice to keep (or quickly restore) this part of the change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you review the latest commit and see if this is what you had in mind?

@@ -182,34 +182,3 @@ describe("unittests:: Public APIs:: getChild* methods on EndOfFileToken with JSD
assert.equal(endOfFileToken.getChildCount(), 1);
assert.notEqual(endOfFileToken.getChildAt(0), /*expected*/ undefined);
});

describe("unittests:: Public APIs:: sys", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth keeping?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’ll bring it back when we decide what the correct thing to assert is

@amcasey
Copy link
Member

amcasey commented Nov 11, 2021

LGTM

@andrewbranch
Copy link
Member Author

@typescript-bot cherry-pick this to release-4.5

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 11, 2021

Heya @andrewbranch, I've started to run the task to cherry-pick this into release-4.5 on this PR at 56842cd. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @andrewbranch, I've opened #46789 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Nov 11, 2021
Component commits:
931b504 Revert "Fix RWC missing file detection (microsoft#46673)"
This reverts commit 4a065f5.

afef282 Revert "Pass absolute path to directoryExists (microsoft#46086)"
This reverts commit 55b4928.

f1a20b3 Revert "Reduce exceptions (microsoft#44710)"
This reverts commit c0d5c29.

56842cd Add back system watcher limit
@andrewbranch andrewbranch merged commit 1298f49 into microsoft:main Nov 11, 2021
@andrewbranch andrewbranch deleted the readDirectory branch November 11, 2021 23:24
andrewbranch added a commit that referenced this pull request Nov 11, 2021
Component commits:
931b504 Revert "Fix RWC missing file detection (#46673)"
This reverts commit 4a065f5.

afef282 Revert "Pass absolute path to directoryExists (#46086)"
This reverts commit 55b4928.

f1a20b3 Revert "Reduce exceptions (#44710)"
This reverts commit c0d5c29.

56842cd Add back system watcher limit

Co-authored-by: Andrew Branch <[email protected]>
mprobst pushed a commit to mprobst/TypeScript that referenced this pull request Jan 10, 2022
…46787)

* Revert "Fix RWC missing file detection (microsoft#46673)"

This reverts commit 4a065f5.

* Revert "Pass absolute path to directoryExists (microsoft#46086)"

This reverts commit 55b4928.

* Revert "Reduce exceptions (microsoft#44710)"

This reverts commit c0d5c29.

* Add back system watcher limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
3 participants