Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc code reshuffle #49

Merged
merged 8 commits into from
Mar 29, 2023
Merged

Misc code reshuffle #49

merged 8 commits into from
Mar 29, 2023

Conversation

evelikov
Copy link
Contributor

Pure code motion - no functional changes intended.

  • stop mixing functions and sequential (?) code - keep functions at the top, everything else at the bottom
  • separate between user-selectable options and internal variables - the setup movement
  • couple other nitpicks

@YHNdnzj
Copy link
Contributor

YHNdnzj commented Mar 26, 2023

Well kind of .... unlike mkinitcpio we have a clunky (m4) include, which makes the final code a complete mess.
Should probably move that instead.

Actually we may try to get rid of m4 completely, to switch to source common in runtime instead.

mkinitcpio is doing this already.

@evelikov
Copy link
Contributor Author

Actually we may try to get rid of m4 completely, to switch to source common in runtime instead.

The common is a complete misnomer since half of it isn't common at all. Generally having it a separate sourcable makes sense for something like mkinitcpio and less so here - there is a separate PR coming to unwrap that.

But overall one should really look at each of these things separately - as a man once said "divide and conquer"

After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Makes it easier to reason about the code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Makes it easier to reason about the code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
@Foxboron
Copy link
Member

Thanks!

@Foxboron Foxboron merged commit 7e4e1c1 into archlinux:master Mar 29, 2023
@evelikov evelikov deleted the misc-reshuffle branch March 29, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants