Skip to content

Instantly share code, notes, and snippets.

@lqd

lqd/check-in.txt Secret

Last active September 16, 2020 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lqd/af2e631b22eb778a986bd7ce9e237228 to your computer and use it in GitHub Desktop.
Save lqd/af2e631b22eb778a986bd7ce9e237228 to your computer and use it in GitHub Desktop.
t-compiler wg check-in
The polonius WG (Niko, Albin, and Rémy) had a sprint at the beginning of August, where:
- we continued the work on move errors: both in rustc to prepare the data needed to do the analysis and actually emit the errors computed by polonius, and in polonius itself, to fix potential false positives, and current efficiency issues in this part of the computation. Some new rules have been written but not yet fully implemented or tested, so this is something we'll continue to look at in the next sprint.
- we were able to prototype our different lifetime analysis, and evaluate it: there was an open question whether it'd be better to track subset relations or equality relations, and we were able to find some subtle flaws in our current thoughts about tracking equality. There's some interesting theoretical core that could be useful in the future, but also has foundational issues, so we decided to keep tracking subset relations for now and not change our existing lifetime analysis rules.
- we continued the work on universal region errors / illegal subset errors: we settled a tiny open question on whether we should compute these errors using subset relations or by looking for unexpected loans in universal regions. We decided to switch to using subset relations because it works everywhere: the polonius analysis is currently split into different parts for validation and efficiency reasons. Our existing subset errors computation had only been added to the main rules used for validation, and it used the "looking at unexpected loans" approach. We did the work necessary to update this, and also to compute the errors in the other parts dedicated to efficiency.
- we were able to work on a fix for the current OOMs in fact generation we see in a couple rustc UI tests: we have prototyped a fix in rustc and polonius. It is, however, quite invasive and requires subtle duplication of rules. So we also started looking at a different fix which could avoid that, and is something we'll continue to look at in the next sprint.
- we did our periodic reevaluation of rustc UI tests using the polonius compare mode: find which tests might have changed .stderr files, add the ones missing for the tests added recently, etc; since the compare mode is not run on CI yet, we do this manually every few months to keep up to date with diagnostics changes and the likes. This time, a new test OOMs for move errors and will be fixed as part of this work mentioned earlier.
- finally, we also looked at supporting profiling polonius' internals from rustc's -Zself-profile, and also when using the tracy profiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment