-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: Build failing #54
Conversation
✅ Deploy Preview for cuhacking-portal-test-deployment ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 🫡 , let me know your thoughts on my questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell, if we want to do this hot fix correctly, we should remove the post file all together. Doing this leads to some other issues we have to fix.
I understand why we haven't deleted it since appRouter needs to have procedures in it, otherwise we get other build errors. But for now, can't we define appRouter
with a dummy procedure that just prints "hello, world"? But I think it leads to less confusion later on. Thoughts @JowiAoun?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't cause many problems to have it like this for a day or two. They're basically all dummy procedures now. I have a team
route in PR #12 which I will re-build and request reviews for one last time, so we can finally deprecate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, that sounds good to me 👍
phone_number: null, | ||
levels_of_study: null, | ||
school: null, | ||
userId: user.id, | ||
} | ||
|
||
await db.userInformation.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we are in progress to migrate to Drizzle, so do we care that this isn't creating a link between the UserInformation Table and the User table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing this is kind of annoying, we have to deconstruct all values of userInformation, except for user.id. We could do const { userId, ...otherUserInformation } = userInformation
data: {
...otherUserInformation,
user: {
connect: {
id: userId,
},
},
},
We'd obviously following better naming conventions. This is just an example of how we'd fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird enough, the schema has the id
automatically defined, but is still required to be defined in the userInformation
object. Since we are in the process of moving to Drizzle, I will leave it as is but good eye.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, was just checking 👍
Im guessing these tests should be failing at the moment because of our issues with |
After further testing with @HasithDeAlwis note: |
Isn't this jsut because we don't have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed from my Android
This PR is meant to fix all build issues on the main branch since the initial commit.
Some of the bug fixes have been:
post
code, not entirely as at least one route is required. Its non-existence in the database caused build errors. This route should be fully discarded once a needed route is created.userInformation
object in the authentication file, which had a duplicateuserId
attributenext
while running the development server.Note: I haven't messed around with
bun
here, but it was just not installed on the repo. This still usespnpm
, and was aimed to only fix the build issues.