-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(fmt): Support .ipynb
extension
#21310
Conversation
.ipynb
extension.ipynb
extension
.ipynb
extension.ipynb
extension
e5c7248
to
9048d16
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.
Nice start and thanks for doing this!
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
c2e0b12
to
d44ffa2
Compare
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
d44ffa2
to
07c0505
Compare
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
07c0505
to
52d0265
Compare
This is to reduce duplicate dependencies for #21310
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.
Looks good to me overall. Just some small changes. Would you be able to merge in the latest main in order to recreate the lockfile? It will have less duplicate dependencies now because of #21330
cli/tests/testdata/fmt/expected_fmt_check_verbose_tests_dir.out
Outdated
Show resolved
Hide resolved
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
52d0265
to
44ffc4a
Compare
from: denoland#21310 (comment) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
44ffc4a
to
c26c0df
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.
LGTM. Thanks a lot @scarf005!
Summary
outdated
changed to using dprint's jupyter plugin
Questions
Extracting structs
I'm not sure if
cli/tools/fmt.rs
is the correct place for 4 struct for jupyter notebook definition. Which module should i move the structs to?Checking whether it's TypeScript notebook
not sure which field is the best. currently using
self.metadata.language_info.name == "typescript"
Frequent rebuilds
I'm suspecting
include_str!
macro is busting incremental build caches.mutation vs cloning
iterating twice (first: format cells, second: check if changes are identical) sounds inefficient, but i'm slightly against using mutation here.
serde(flatten)
is unstableEDIT: fixed by changing from
HashMap
toBTreeMap
.related: https://old.reddit.com/r/rust/comments/krgvcu/is_the_iteration_order_of_hashset_deterministic/