Skip to content

feat(librarymanager): allow to use custom providers - #802

Merged
olofk merged 1 commit into
olofk:mainfrom
tymonx:feature/custom-provider
Aug 10, 2026
Merged

feat(librarymanager): allow to use custom providers#802
olofk merged 1 commit into
olofk:mainfrom
tymonx:feature/custom-provider

Conversation

@tymonx

@tymonx tymonx commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Closes #797

This PR allows to use custom providers to manage FuseSoC libraries.

Additionally:

  • Moved the Library class to own fusesoc/library.py module. This is required to avoid circular imports between provider and library manager. The implementation of the Library.update() method was moved to the library manager to break the circular import of the Library class
  • Added missing type annotations in providers, library and library manager
  • Added missing docstrings in providers, library and library manager
  • The library manager is now abstracted from providers (except for the local provider). Replaced strings like checkout that are git specific with update/initialize
  • Removed the library_root attribute from the library manager. It was never used anywhere. Dead attribute
  • Optimized the LibraryManager.get_library() method for fast lookup by using dictionary instead of list
  • Using lazy evaluation in logging. Reason: https://news.ycombinator.com/item?id=44600537

@tymonx
tymonx force-pushed the feature/custom-provider branch from f631a27 to 4d3540b Compare August 9, 2026 12:24
@tymonx
tymonx force-pushed the feature/custom-provider branch from 4d3540b to 9355587 Compare August 9, 2026 12:25
@tymonx
tymonx marked this pull request as draft August 9, 2026 12:39
@tymonx
tymonx marked this pull request as ready for review August 9, 2026 12:43
@olofk

olofk commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Thanks! This looks like a nice cleanup. The original code was a bit messy so I haven't looked too closely at the logic changes. We should probably have some more tests here to help future changes, but that can be done separately.

A note about library_root. The intention was to provide a way to set the default library location (i.e. fusesoc_libraries) from the command-line or configuration file. It looks like this was never wired up properly though, so I think it's the right call to drop it completely.

@olofk
olofk merged commit 318ab3a into olofk:main Aug 10, 2026
12 checks passed
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.

bug(library): cannot use custom provider for library management

2 participants