Skip to content

Update current sources while reading late sources#1467

Open
damianorenfer wants to merge 1 commit intosmallrye:mainfrom
damianorenfer:improve-late-souces-init
Open

Update current sources while reading late sources#1467
damianorenfer wants to merge 1 commit intosmallrye:mainfrom
damianorenfer:improve-late-souces-init

Conversation

@damianorenfer
Copy link

Without this, a custom ConfigSourceFactory is not able to access properties defined in files referenced in smallrye.config.locations.

@damianorenfer damianorenfer force-pushed the improve-late-souces-init branch from ec38adb to f35cade Compare January 26, 2026 15:43
Without this, a custom `ConfigSourceFactory` is not able to access
properties defined in files referenced in `smallrye.config.locations`.
@damianorenfer damianorenfer force-pushed the improve-late-souces-init branch from f35cade to 756ef8c Compare January 26, 2026 21:46
@radcortez
Copy link
Member

Thank you for the PR.

I'm not sure if we want to support this. The reason why we don't update late sources mid-read is that we don't know their order, so in the case you have multiple configurable sources, they don't contribute values to each other, because you may end up having different configuration values for the same key on each added source.

Maybe we could explore initializing sources with smallrye.config.locations at the same time as profile sources, since we already defined that sources loaded this way use the ordinal of the winning source to get smallrye.config.locations , and leave the rest of the late sources next.

@damianorenfer
Copy link
Author

Sure, thanks for having a look.

You know the lib better than me, I trust you

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