Skip to content

Various project cleanups - #1065

Open
pjungkamp wants to merge 10 commits into
masterfrom
cleanup
Open

pjungkamp wants to merge 10 commits into
masterfrom
cleanup

Conversation

@pjungkamp

@pjungkamp pjungkamp commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

I long wanted to remove the split between libvillas, libvillas-common and libvillas-fpga. It's often confusing or ambiguous whether some code should reside in common/{lib,include} or the toplevel {lib,include} directories.

Changes

I've moved all code from the former common directory either to the toplevel or into fpga and done some light cleanup on the namespace and directory structure.

libvillas-fpga is no longer a separate library. It had its own C API for dma access for which I didn't find any real consumer. I've removed that API because the library name change would break any consumer anyway. If we notice any regression we can fix the consumer and add the DMA API back in.

This merge made the duplication between villas/node/exceptions.hpp and villas/exceptions.hpp pretty obvious. I've gone through all exception classes and removed the following ones:

  • villas::ParseError: Never constructed except as the base class of villas::JanssonError
  • villas::JanssonParseError: Tries to report libjansson error information, but doesn't give useful locations anymore since we migrated to nlohmann/json for the parsing step. This needed a little cleanup in the villas-hook tool.
  • villas::ConfigError: The main error used to report invalid configuration values, I've just replaced every instantiation with a JsonError and tried to add location information to each one in the form of JSON pointers.

AI Use

This refactor was assisted by Claude Opus 5.5. Mainly to convert all the ConfigError instances.

Signed-off-by: Philipp Jungkamp <[email protected]>
Signed-off-by: Philipp Jungkamp <[email protected]>
- Running for `1 << 16` iterations takes about 40s on my machine
  which exceeds the default timeout of 20s imposed by criterion.
- Criterion can't reliably pass pointers as parameters to
  parameterized tests because these are passed through shared
  memory to a new process. A PIE executable can not use
  pointers from the test parameters because of ASLR.

Signed-off-by: Philipp Jungkamp <[email protected]>
@pjungkamp

Copy link
Copy Markdown
Contributor Author

Seems like the markdownlint pre-commit check broke the CI...

https://github.com/VILLASframework/node/actions/runs/45528356145/job/138917233142?pr=1065#logs

@n-eiling

Copy link
Copy Markdown
Member

Looks reasonable. This breaks DPsim though. So you need a follow up PR there.

This branch was successfully deployed

1 active deployment
internal — 0f65aad5 Deployed Nov 25, 2026 by pjungkamp via Setup Variables #316
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