alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

Obscure message "No release visited in round 3" #1520

Open stcarrez opened 10 months ago

stcarrez commented 10 months ago

In my spdx-tool project which contains several nested crates, I've obtained this obscure message:

cd tools && alr build -- -XBUILD=coverage
error: No release visited in round 3                                  
error: alr encountered an unexpected error, re-run with -d for details.

Running with -d option does not help at all.

I suspect that the alire directory was not updated or correct and a minor edit of the alire.toml file triggered some update that solved the issue.

May be a suggestion like Try running alr update would help users faced to this very obscure message.

One possibility that explained why I reached that situation, is that the parent crate (referred to by using spdx_tool = { path='..' } had a new depends-on that was not (yet) taken into account by the child crate.

mosteo commented 9 months ago

The thing is that error should never happen to a final user. It tells me there's some trouble in the generator of the safe order for deploying dependencies.

Essentially, errors that end in alr encountered an unexpected error won't have a proper solution we can propose, as they shouldn't happen in the first place. May be we should clarify this. Other errors we diagnose and try to provide a more useful message.

The trouble it's likely related to what you point of a second-hand manifest being modified and not updated, since we aren't currently transitively checking all manifests for changes.

On which version did you see this problem?

stcarrez commented 9 months ago

I'm using alr 2.0. I've reproduced and reached the issue quite easily in fact several times....

The project has several crates and if I add a with command to a top-level crate, it is fine and updates correctly. The issue arise on crates that depend on it.

It is fine that "sub-crates" are not updated (there is no way for you to know where they are in fact). At least, there should probably a message suggesting to run the try running the alr update command which seem to fix the issue.

mosteo commented 9 months ago

OK, I'll try to reproduce.