matrei commented on PR #16547:
URL: https://github.com/apache/grails-core/pull/16547#issuecomment-6031294735

   I added it as part of the Spring 6 / Boot 3 upgrade (#13545). When I 
switched our test `application.yml` from `spring.profiles` to 
`spring.config.activate.on-profile`, `NavigableMapSpringProfilesSpec` failed 
because the `DocumentMatcher` in `YamlPropertySourceLoader` only looked at 
`spring.profiles`. I found the old `shouldSkipBlock` in `NavigableMap`, whose 
call had been removed in 03bef04 back in 2018, assumed that was an oversight 
and wired it back in. In hindsight that was the wrong layer: the profile check 
belongs in the loader's document matcher, not in every `merge`. So Grails 4–6 
never filtered on merge, which lines up with 6.2.3 working.
   
   Moving it into the loader looks right to me. Two small things:
   - The legacy `spring.profiles` comparison went from `equalsIgnoreCase` to 
`equals`. Should we keep it case-insensitive to avoid a behaviour change in a 
patch release?
   - Not new, but neither version handles profile expressions (`a | b`, 
`!prod`) or multiple active profiles (`dev,alpha`). Maybe a follow-up using 
`Profiles.of(...)`?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to