Comments (10)
Happy to make a PR if ya don't mind pointing me on where to get started!
Awesome! You can make a fork and create a PR based off the "dev" branch.
I believe the only change needed is this line here: https://github.com/zenstackhq/zenstack/blob/fea8ec71eac83e880112d64057355e8d2979bd18/packages/language/src/zmodel.langium#L212C10-L212C19
name=RegularID
to name=RegularIDWithTypeName
.
If you run pnpm build
, a few other files (like ast.ts
) will be auto-updated and should be included in the change.
If you want to test it out locally, you can pnpm build
in the language
package, and copy over the content of "dist" folder into your node_modules.
Let me know if you run into any hurdle.
from zenstack.
Fixed in 2.1.0
from zenstack.
Hey @ymc9 seems like I'm still running into the same issue on v2.1.1
Looking at the test in the commit seems like it only tests for the name used as a field on a model vs an enum value that either
- I'm doing something wrong (very possible)
- The change fixed it for fields but not enum names
from zenstack.
Oh, my apologies. You're right, the support was only added for model fields not enum fields ... Will make one more fix later today. Please also let me know if you're interested in making a PR 😄 @francistogram
from zenstack.
Happy to make a PR if ya don't mind pointing me on where to get started!
from zenstack.
I've made the change and was able to build it'
I am a little stuck with testing it locally
If you want to test it out locally, you can pnpm build in the language package, and copy over the content of "dist" folder into your node_modules.
Was initially thinking maybe I'd copy over the changed files e.g. ast.ts
but that file doesn't seem to exist in the node_modules
, closest thing I found was ast-utils.js
Any pointers here on what I might be missing?
from zenstack.
Good to know the progress @francistogram ! The npm package corresponding to the "language" pnpm package is actually "@zenstackhq/language". You should be able to find "ast.js" at "node_modules/@zenstackhq/language".
from zenstack.
Ah the @
explains why I hadn't seen it in the folder 🤦♂️
Almost there I think, unclear to me if this is an issue related with my change or with my schema.zmodel
as this is my first time setting up zenstack (this issue was preventing me from migrating easily)
These are some of the lines it's complaining about it you see any issues here?
I went ahead and put up a PR in case this helps in debugging if I did anything wrong
Thanks for the help here too!
from zenstack.
Ah the
@
explains why I hadn't seen it in the folder 🤦♂️Almost there I think, unclear to me if this is an issue related with my change or with my
These are some of the lines it's complaining about it you see any issues here? I went ahead and put up a PR in case this helps in debugging if I did anything wrongschema.zmodel
as this is my first time setting up zenstack (this issue was preventing me from migrating easily)Thanks for the help here too!
Hey @francistogram , the change looks cool to me. I've merged it. And then I found I overlooked that reference expressions also need to respect reserved type names, otherwise enum fields cannot be properly resolved. I've pushed an extra fix.
Will publish a patch release today. Thank you for the work!
from zenstack.
The change is live in v2.1.2 now!
from zenstack.
Related Issues (20)
- [BUG] Query Discrepancy with Selected Relation Fields HOT 2
- [Language Server] No autocompletion is provided when accessing `auth().`
- input error when querying compound key entry HOT 2
- [BUG] Types generated when using `@default(auth().id)` are not compatible with third party libraryes HOT 2
- [Feature Request] TRPC plugin should generate router procedure for permission checker
- Error - Maximum call stack size exceeded HOT 6
- Policy filtering should respect field-level access policies HOT 1
- [Feature Request] Reuse primitive types with validation rules
- [Feature Request] Compatibility with Prisma 5.14 `createManyAndReturn` HOT 3
- [Feature Request] Hono Support HOT 1
- [Feature Request] Supporting comparing fields of different models in policy rules HOT 1
- [Feature Request] Allow Disabling of Version Check HOT 1
- Prisma schema validation error - Relation map argument is too long HOT 1
- _count on inherited model not working HOT 2
- [Feature Request] Querying genererated API with fetch HOT 2
- [Feature Request] Stop certain access control rules not to be applied while connecting/disconnecting relationship HOT 1
- [TanStack Query] UseInfinite hooks should make the `initialPageParam` option field optional and use the args argument to fill it HOT 1
- [Feature Request] Access control for Prisma Pulse
- Polymorphic model with inherited relation error HOT 3
- Futures do not work with date fields HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenstack.