Closed kimikage closed 4 weeks ago
Of course, the above is just a PoC, and in practice, separate measures should be taken for cases such as when TAB is pressed twice.
I am not familiar with Pkg or REPL internals, so I am hoping someone will address this issue and backport the measure to v1.11. I showed the monkey patch just in case the improvements were not made in time for the v1.11 release.
I was suprised why it would have to go through all the TOML files at all but I see now it is so that it can filter out versions that are incompatible with the Julia version. Maybe that is not worth it...
Ah, I have been using the uncompressed registry for package development compatible with the older julia (LTS v1.6 or even older). This causes major problems if the compressed registry cannot be recognized for some reason (including the simple case where LTS is installed first).
However, since not all users are using compressed registry and there is still enough latency to be noticeable even with compressed registry (e.g., on hitting "S"), I am certain that this is a design issue.
The inline tip is only showed when there is a single matching result so we can just propagate the hint
kw from complete_line
to complete_remote_package
and have it abort as soon as it is more than one matching results.
This is not directly related to this issue, but I suspect that there are more users using uncompressed repositories than core developers think.
I assumed that compressed (or in-memory) registries would always be used in Julia v1.7 and later, and in fact, I used the compressed registry on Linux without being aware of the default behavior. However, that was because I had separate Linux containers.
Despite my rudeness, thank you for your prompt response.
just a memo for those who came later: https://github.com/JuliaLang/Pkg.jl/pull/3913#issuecomment-2145313089
I checked the last comment around midnight JST. Pkg precompilation failed on my Windows environment due to a problem with loading LLVM (which should be unrelated to this issue). In the morning, I checked the behavior on Linux. No malice intended there. The only thing is that it is just a little more work to check the stdlib than the usual packages.
As this is related to the tremendous efforts for TTFX, the TTFCompletion of remote package names is still stressful in some cases. (Edited)
The main source of latency (with uncompressed registry) is to check all relevant TOML files for compatibility of candidate packages. You can see what is happening while typing a package name with the following monkey patch:
However, in terms of user input completion, you should be able to give up when the final candidate is no longer determinable. Therefore, I believe that the following monkey patch would be useful.