Skip to content

Conversation

Jolanrensen
Copy link
Collaborator

#178

Basically, I added a filter for data classes when passing knownMarkers on to codeGenerator.generate(), so it cannot appear as supertype anymore.

Small cleanups

@Jolanrensen Jolanrensen self-assigned this Nov 28, 2022
@Jolanrensen Jolanrensen added the bug Something isn't working label Nov 28, 2022
@Jolanrensen Jolanrensen added this to the 0.9.0 milestone Nov 28, 2022
…r to be isOpen.

Extra check for isOpen in getAllSuperMarkers
… is not bound to an actual property. Also non isOpen DataSchemas are no longer expected to be inherited from.
@Jolanrensen Jolanrensen force-pushed the jupyter-inherit-from-dataclass-bug branch from d90f4c4 to 3396425 Compare November 30, 2022 14:19
@Jolanrensen Jolanrensen merged commit 23afc79 into master Nov 30, 2022
@Jolanrensen Jolanrensen deleted the jupyter-inherit-from-dataclass-bug branch November 30, 2022 15:10
@koperagen
Copy link
Collaborator

Soo... how did i missed that part of the PR? :D I'm not sure if val properties should be isOpen = false, unless there is a good reason, because previously schema processor would reuse existing markers from time to time thus reducing amount of generated code.

@Jolanrensen
Copy link
Collaborator Author

Well, before, I think, all were isOpen = false and it just wouldn't check it. That's where the bug came from. But other than that, the call in ReplCodeGeneratorImpl.kt:82: return generate(schema = targetSchema, name = markerInterfacePrefix, isOpen = isMutable) has been there always. Where isMutable is defined by whether the variable is a var (KMutableProperty). But I agree, it probably shouldn't matter whether it's a var or val

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants