Skip to content

Conversation

@jestabro
Copy link
Contributor

@jestabro jestabro commented Oct 28, 2025

Change summary

This adds explicit compiler alerts to track exceptions within vyos1x-config and its use in vyconf and libvyosconfig.
The benefit of this "poor-man's" static analysis is a careful audit of all raised exceptions in any use of the library.
The downside is mildly unpleasant annotations and comments within the code, which will remain temporarily to provide (1) compiler warnings for any additions in vyos1x-config/vycon/libvyosconfig (2) comments describing the exception handling. These will eventually be subsumed by consistent handling using the above as a guide.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe): compiler driven exception audit

Related Task(s)

Related PR(s)

vyos/vyconf#33
vyos/vyos-1x#4814

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@jestabro
Copy link
Contributor Author

Added minor change to value_exists before exposing in libvyosconfig.

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

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

I'm all for more compile-time checks, so let's try this.

@dmbaturin dmbaturin merged commit 6e2a6ef into vyos:current Nov 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants