-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Typecheck javascript #21377
Typecheck javascript #21377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different vector/approach than the "relaxed" marker. I'm fine with supporting both and seeing whether a check-by-check or file-by-file approach works better -- and it's nice that we have a choice and can pick the best for the current situation.
But I'd like to see a strategy how we put that into CI. Right now this is entirely optional and dev-side only, and nothing prevents PRs from regressing JS files again. So can test/static-code call the script with --javascript
a second time? How is that related to the cache issue you mentioned?
Note the ruff error, which needs to be fixed for this to land.
Thanks!
I'm not sure if I like adding markers in JavaScript files which are totally non-related to JavaScript. I want to experiment with removing errors one by one. And seeing how it goes.
Well that would be running with
That's fixed locally. |
Yes, I agree, that's what I meant with my reply. 👍
So My point is: If we land this as-is, this is neither enforced by CI nor documented. If that's an experiment, that's ok, but I'd like to know how we get from here to "CI checks and gates on this". As otherwise we'll regress this all the time. |
I should have marked this as draft :) I started with optional
will do! |
85fe184
to
08ed416
Compare
The typing information we have in pkg/lib and general TypeScript errors are also useful for JavaScript but generate tons of errors. So we treat these errors independent from the TypeScript errors so we can one by one fix our JavaScript, or port it to TypeScript.
08ed416
to
a97c5e7
Compare
@martinpitt GitHub hides your comment but I've adjusted the commit message :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This works for me. @mvollmer can you please check, too?
@@ -47,7 +47,7 @@ export function make_iscsi_session_page(parent, session) { | |||
page_location: ["iscsi", session.data.target_name], | |||
page_name: session.data.target_name, | |||
page_icon: NetworkIcon, | |||
page_categroy: PAGE_CATEGORY_NETWORK, | |||
page_category: PAGE_CATEGORY_NETWORK, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The list of ingored errors is long and pretty arbitrary, but this might catch some regressions and then we win.
Cleaning that up is a huge effort and not always possible. As requested on Matrix here is the statistics for the type of errors:
|
When we clean up code and the ignored TypeScript error for JavaScript no longer applies make gating fail.
d85df2e
to
d0538a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Now I want a mode that outputs the statistics! :-)
Let's typecheck JavaScript! With the typecheck script we can also run it on JavaScript and filter out all errors we get and error by error remove them. As for example in this PR, spotted a silly typo :)
One issue is that running with
--javascript
and then without busts the cache, so maybe we just always want to run with--javascript
as that should probably work filtering based on file and error list.