Repository navigation
feat: #min_imports in the module system - #168
Conversation
This reverts commit 9f90de2.
…clConstInfoNeeds`
|
Okay, I've responded to Kim's helpful bot review from this gist. :) (Claude summarized the items and organized this doc, I wrote the responses (and the code!) manually.) Fixed168-2 · Extra module-use records do not reach import needsReview: 168-3 · Wrapped invocations count the command's own syntax and duplicate importsReview: Inside a wrapper such as 168-4 · Unsupported non-module files continue into the rewriteReview: Non-module files get a warning but still receive a 168-5 · New tests are outside the test root and bypass EOF schedulingReview: The new test files aren't imported from 168-7 · Verify tool-provider preservation across import phasesReview: Asks for a test that the suggested imports keep 168-8 · Diagnostic classification uses a different needs set from the replacementReview: The "imports can be reduced" check compares against 168-9 · Compatibility and documentation follow-upsReview: Asks whether removing the deprecated Deliberately not addressed168-1 · Dependencies used only by commands disappearReview: 168-6 · EOF messages escape
|
|
Thanks @thorimur ! |
This PR upgrades
#min_importsto function in the module system.It also includes an ergonomic upgrade:
#min_importscan now be run from any point in the file, and will take into account the declarations in the entire file, including those which come after it. However, there is currently no indication that the command is still running until we reach the end of the file. This will be addressed in future PRs.This also performs some misc. related changes now that the trio of
#norm_imports,#min_importsand#find_homeare updated#minimize_importsAs well as some miscellaneous refactoring. This includes a nearby bugfix to
WorkspaceModelwhich indirectly has to do with theInitmanagement needed at some point by#min_importsin this PR.