Skip to content

Conversation

@simolus3
Copy link
Owner

@simolus3 simolus3 commented Jan 4, 2025

The manager templates used to disable generating a typed reference class when modular code-generation was enabled, instead referring to the general BaseReferences class in the runtime package.

This adds support for that feature by resolving the modular-specific issues (like referring to typedefs and classes by their imported name if needed).

This is tested by the modular package which can now use that feature. But @dickermoshe it would be helpful if you could take a quick look to make sure I didn't miss anything.

Closes #3398.

@simolus3 simolus3 requested a review from dickermoshe January 4, 2025 21:16
@github-actions github-actions bot temporarily deployed to commit January 4, 2025 21:20 Inactive
@github-actions
Copy link

github-actions bot commented Jan 4, 2025

🚀 Deployed on https://deploy-preview-3399--moor.netlify.app

@github-actions github-actions bot temporarily deployed to pull request January 4, 2025 21:21 Inactive
Copy link
Collaborator

@dickermoshe dickermoshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

I think we should add tests so that all manager tests are also ran on modular code.

btw, when using the manager it's really helpful to do modular generation because otherwise the generic is private (_$AppDatabase) so I'm pumped about this

@simolus3
Copy link
Owner Author

simolus3 commented Jan 5, 2025

I think we should add tests so that all manager tests are also ran on modular code.

This is tricky to pull off without copy-pasting all the tests and keeping them in sync 🤔 After all, we'd have to run both the default and the modular builder on the same database definitions, but they would generate separate and independent manager classes.

As a first step, I've added a simple test to the modular package.

@github-actions github-actions bot temporarily deployed to commit January 5, 2025 14:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 5, 2025 14:24 Inactive
Copy link
Collaborator

@dickermoshe dickermoshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you feel the testing is sufficient.
btw, with the status on this PR #3281

@simolus3 simolus3 merged commit 7f833b4 into develop Jan 5, 2025
33 checks passed
@simolus3 simolus3 deleted the modular-manager-references branch January 5, 2025 15:31
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

Successfully merging this pull request may close these issues.

cannot prefetch references if we use modules

3 participants