You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restricting extra keys causes memory leak in compojure-api #433
The fix #415 reportedly causes a memory leak in compojure-api, which assumes keys of a map schema never change their equality: metosin/compojure-api#454
Line 211 presumably could add some information to the spec (as metadata?); I'm not 100% sure that it's safe to just check if the schema is a map and look for keys that aren't a special type, but if so then seems like it would work.
Activity
frenchy64 commentedon Dec 1, 2021
@gfredericks is there another solution to this? Could we move this code to the generators lib instead?
gfredericks commentedon Dec 4, 2021
It does seem like moving it to generators would be better.
Looking back at it it seems like this is where you'd want to do the filtering, but at this point in the code we only have the spec, not the schema: https://github.com/plumatic/schema-generators/blob/b0ecf2c8659ca985144c74e4be2a5a7c9e55596f/src/schema_generators/generators.cljc#L78
Line 211 presumably could add some information to the spec (as metadata?); I'm not 100% sure that it's safe to just check if the schema is a map and look for keys that aren't a special type, but if so then seems like it would work.