hilla
hilla copied to clipboard
Rename the internal Pageable so it does not show up for the user
Description of the bug
When auto complete the import for Pageable you end up with a choice: Should you use dev.hilla.mappedtypes.Pageable or org.springframework.data.domain.Pageable. We should rename dev.hilla.mappedtypes.Pageable to MappedPageable or InternalPageable or something so it does not show up as an option. Still the TS generator should use Pageable for the generated code.
I'm not sure that renaming internal Pageable is a good idea because now the generator (both old and new) does not support name mapping. It just uses the full class name it received.
I came to two options here:
- We could try using specific part in the pacakage name, like
dev,hilla.mappedtypes.internal.Pageableordev.hilla.mappedtypes.noapi.Pageable. The same approach used by ClassGraph and I would say it is pretty clear that I shouldn't use the part insidenoapipackage. - We could try to use some features provided by the Java 9 module API. I haven't tried it yet but Idea have nothing against the following code:
Though it would work only in Java 9+ environment.module dev.hilla.mappedtypes { exports dev.hilla.mappedtypes to dev.hilla.generator; }
I'm not sure that renaming internal Pageable is a good idea because now the generator (both old and new) does not support name mapping
That is exactly what this issue is about. To support that :)
Changing the package name does not help, you still have two options to choose from. The problem is not that you do not understand which to pick (well it is a smaller problem), the problem is that typing Pagea and completing it shows more than one option.