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

Add noUnusedLocals to tsconfig + fix the new alerts #6396

Merged
merged 5 commits into from May 14, 2024

Conversation

OfekShilon
Copy link
Member

No description provided.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was merged in a different PR, can ignore here.

return `Tree #${this.id}`;
}

private updateTitle() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see it not being used, but it still confuses me. I guess it gets the container title directly from the factory?

Copy link
Contributor

Choose a reason for hiding this comment

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

no...

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, it IS used, but by some black magic event handling.
image

So you should not remove these functions, maybe make them public to avoid being removed and then we can see how to make it bit more transparent these things are linked (but I'm not sure how (perhaps best to use an interface, I think the "normal" Pane's do use that))

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! The black magic isn't in event handling, I think it comes down to PaneRenaming being completely untyped and in particular uses pane: any to successfully call the Pane-private pane.updateTitle() (which resolves to Tree.updateTitle), and this is all hidden from TS. I'll revert the deletion, not sure I'll be able to properly fix the typing.

@mattgodbolt
Copy link
Member

Are ... we good with this? I'd love to get more cool things merged but feel there's some tings to solve yet with the panes above, if I read it right?

@OfekShilon
Copy link
Member Author

Are ... we good with this? I'd love to get more cool things merged but feel there's some tings to solve yet with the panes above, if I read it right?

Sorry, I dropped this ball. Will return to this soon.

@OfekShilon OfekShilon merged commit bcb397f into compiler-explorer:main May 14, 2024
9 checks passed
OfekShilon added a commit to OfekShilon/compiler-explorer that referenced this pull request May 14, 2024
…r#6396)

<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants