Skip to content

feat: improved error handling#178

Open
justsaft wants to merge 7 commits intoVanilla-OS:mainfrom
justsaft:better-errors
Open

feat: improved error handling#178
justsaft wants to merge 7 commits intoVanilla-OS:mainfrom
justsaft:better-errors

Conversation

@justsaft
Copy link
Contributor

@justsaft justsaft commented Mar 11, 2026

This change is aimed to improve the UX of errors from Vib.
To achieve this, Vib now acts more like a compiler, specifically as in collecting as many as possible errors in stdout before exiting, and giving clearer error messages while doing so.

Some help to get the last few nits picked would be very much welcome and appreciated.
This is mainly set to draft because I only had limited time for error path & happy path testing and would like potential bugs I haven’t noticed to be fixed before a release of Vib.

Changes:

  • clearer and more explicit printed messages that go along this scheme:
    • Building [ <type of module> ] module <module name> of <submodule> included by <including module>:
  • introduced helper function to avoid code duplication
  • handling of specific errors to continue collecting errors
  • duplicate module name checks
  • handles empty plugin name
  • handles non-existent Plugin with error message
  • renames a bunch of err and error named variables to use an underscore so we can import errors
  • adds machinery to control recursive including depth of modules
  • changes messages to better tell if a submodule of an include module is being built -> better chance of immediately locating problems

Resolves:

https://discord.com/channels/1023243680829681704/1468666070343618836
Vanilla-OS/custom-image#26
#147

Need ideas for:

  • package scope variables at top of core/build.go
  • storing every path of every recipe/module Vib encounters -> error printing

@NN708
Copy link
Member

NN708 commented Mar 12, 2026

Could you rebase this onto main?

@justsaft justsaft marked this pull request as ready for review March 16, 2026 19:59
@justsaft
Copy link
Contributor Author

This rebase feels rather dirty I'm not gonna lie. Either way this should bring in all the changes from main.

Copy link
Member

@NN708 NN708 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. A rebase is still necessary to maintain a clean, linear commit history. I also suggest splitting the changes into several smaller commits, each focused on a single functional change. This will make the review process much easier and the history more readable.


var modulesCount int
var includeDepth int
var maxIncludeDepth = 1
Copy link
Member

Choose a reason for hiding this comment

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

Why limit this to 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason other than to test this. Whether or not there are recipes out there that use this or not, we should not restrict this at 1. I'm gonna get back to this in a bit.

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.

2 participants