Skip to content

New build --stop-after#1573

Merged
mosteo merged 7 commits into
alire-project:masterfrom
mosteo:feat/build-stages
Feb 23, 2024
Merged

New build --stop-after#1573
mosteo merged 7 commits into
alire-project:masterfrom
mosteo:feat/build-stages

Conversation

@mosteo

@mosteo mosteo commented Feb 19, 2024

Copy link
Copy Markdown
Member

This allows stopping the build process at different points, which may help in debugging actions, ensuring up-to-date config without requiring updating dependencies nor building, etc.

Fixes #1544

@mosteo mosteo marked this pull request as ready for review February 20, 2024 14:46
.New_Line
.Append (TTY.Bold ("Build stages"))
.New_Line
.Append ("Instead of a full build, the process can be stopped early "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain when this could be useful. This is a debug tool, and people who are not experts may be in bad situations after using it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an explanation after the steps, and a clarification that a regular alr build should leave things as intended.

Comment thread src/alire/alire-builds.ads Outdated
-- many more shared releases in the vault, finding toolchains could take
-- much more time, hence the separate storage.

type Build_Stages is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a nice process for builds, but I see it is separate from how the code will run.
We may add new stages that will not be added to this enum, and vice versa.

Maybe we can have it more explicit with a loop like this:

for Stage in Build_Stages loop
   case Stage is
      when Sync =>
      when Generation =>
      
      -  Etc,
end loop;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand what you mean, but not the implementation detail. What is that loop intended to replace?

Maybe the enum can be renamed to Stopping_Points as to make explicit what they are intended to be used for.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that's an oversimplification of the build process on my part, and the different steps in the build are probably spread across different locations in the code.

Maybe the enum can be renamed to Stopping_Points as to make explicit what they are intended to be used for.

Indeed that would probably be better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Yes, it's not as clear-cut as that, as there's some recursion involved through the dependency tree. I'll change the name then.

Comment thread doc/user-changes.md
@mosteo mosteo merged commit 9e07894 into alire-project:master Feb 23, 2024
@mosteo mosteo deleted the feat/build-stages branch February 23, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

post-fetch action doesn't run when enclosed by [[actions."case(distribution)"."..."]]

2 participants