Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom records awkward to register due to package private constructors in the default records #81

Open
vlofgren opened this issue Dec 13, 2023 · 1 comment

Comments

@vlofgren
Copy link

This is a very minor API issue I ran into.

I wanted to define a custom record type instead of tacking weird nonstandard semantics onto revisits. This proved difficult since all the existing record types have package private constructors. I was able to work around it by putting the record in a package 'org.netpreserve.jwarc' shadowing the library, thus gaining access to the default records.

If this is the intended way of doing it, it would probably make the library easier to use if there is an example or something demonstrating a working set-up?

@ato
Copy link
Member

ato commented Dec 14, 2023

I put the custom record types mechanism in early on and then largely forgot about it so the package private constructors are more just something that hasn't been considered rather than there being an intentional way to use them. You're likely the first person to try. Feel free to open a pull request with any changes you find you need (as long as they preserve API backwards compatibility).

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

No branches or pull requests

2 participants