Zulip Chat Archive

Stream: general

Topic: Imports are out of date


Noailles (Oct 17 2023 at 05:13):

I have updated my lean toolchain, and have already run 'lake exe cache get' successfully. But VScode tells me 'Imports are out of date and must be rebuilt; use the "Restart File" command in your editor.'. What should I deal with this problem?

Eric Wieser (Oct 17 2023 at 05:14):

You should open the "command palette" and run the "restart file" command

Noailles (Oct 17 2023 at 05:20):

Thanks!

Kevin Buzzard (Oct 17 2023 at 06:31):

Yikes. Is this a new message? Should it be clarified?

Mario Carneiro (Oct 17 2023 at 06:34):

I believe it is new

Mario Carneiro (Oct 17 2023 at 06:35):

@Marc Huisinga Any chance of getting a popup with a button out for this soonish?

Mario Carneiro (Oct 17 2023 at 06:36):

I'm guessing that because the error message comes from Lake it doesn't have much ability to do more than give advice like this

Mario Carneiro (Oct 17 2023 at 06:37):

although I suppose it could give more precise coordinates to the "Restart file" command

Marc Huisinga (Oct 17 2023 at 06:39):

The error comes from the server. I'll see if I can add a popup for this soon.
On another note, you can also re-enable automatic builds on the most recent RC by selecting "Automatically Build Dependencies" in the VS Code extension settings.

Floris van Doorn (Oct 17 2023 at 08:37):

Does this mean that opening a Lean file will never cause dependencies to be built automatically, and you can still work in the file using the old olean files? That's great! :tada:

Marc Huisinga (Oct 17 2023 at 08:41):

Floris van Doorn said:

Does this mean that opening a Lean file will never cause dependencies to be built automatically, and you can still work in the file using the old olean files? That's great! :tada:

Dependencies will not be built automatically, but you cannot work with the old olean files either.

Eric Wieser (Oct 17 2023 at 08:48):

So is working with the old oleans no longer supported?

Marc Huisinga (Oct 17 2023 at 08:49):

You can still work with old oleans as you could before if you already had an editor for that file open. The only behaviour that changed is that opening a file or changing the imports does not automatically trigger a rebuild anymore.

Marc Huisinga (Oct 17 2023 at 08:59):

Mario Carneiro said:

Marc Huisinga Any chance of getting a popup with a button out for this soonish?

This is now at vscode-lean4#335 and I will merge and release it later today.


Last updated: Dec 20 2023 at 11:08 UTC