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

Detect package names added/removed from attw.json as changed #944

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Feb 8, 2024

For DefinitelyTyped/DefinitelyTyped#68558 (and others in the future)

@jakebailey
Copy link
Member

The way that we install things means that this will cause new failures; we use a filtered install so pnpm is not going to know that it needs to install those packages too and so they'll definitely fail tests.

A potential way we can try and do this is to update https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/scripts/pnpm-install.sh to detect that case and tack on a few more filters.

That or we move pnpm install back to dtslint-runner, but there are other reasons I want to try and avoid that.

const versionPath = isLatest ? dirPath : joinPaths(dirPath, `ts${hi}`);
if (lows.length > 1) {
console.log("testing from", low, "to", hi, "in", versionPath);
if (npmChecks !== "only") {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this is a nit, but if this were written as an early return, I think it may be clearer / less diff-y?

if (npmChecks === "only") {
   return;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

There’s stuff after this block, though

Copy link
Member

Choose a reason for hiding this comment

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

Ah, crap. The GitHub diff ended perfectly right after the block and I really thought the function had ended 😄

image

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Seems reasonable now that it will just run ATTW on those packages removed but unchanged. I have not tested it on a specific PR, though.

@andrewbranch
Copy link
Member Author

I tested it locally on DefinitelyTyped/DefinitelyTyped#68558 and it worked.

@andrewbranch andrewbranch merged commit 9da3fc7 into main Feb 8, 2024
6 checks passed
@andrewbranch andrewbranch deleted the attw-affected branch February 8, 2024 23:45
@andrewbranch
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants