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

PG 15 upgrade #93

Open
pyramation opened this issue Dec 22, 2022 · 7 comments
Open

PG 15 upgrade #93

pyramation opened this issue Dec 22, 2022 · 7 comments

Comments

@pyramation
Copy link
Collaborator

pyramation commented Dec 22, 2022

[email protected]

@data-envoy
Copy link

Hi pyramation, thanks for providing a useful project.

We have an issue ( supabase/supabase#13267 ) over on the supabase repo regarding Postgres 15 syntax not validating in their SQL Editor.

We managed to trace the issue back to pgsql-parser supporting up to PG 13, but no further.

Is version 15 support planned?

Regards (ツ)

@nith2001
Copy link

nith2001 commented Apr 3, 2023

I got started on trying to update libpg-query to Version 15, but I'm facing some difficulty with the actual update process before I can even start debugging and writing tests. How would I update the version here: https://github.com/pyramation/pgsql-parser/blob/master/packages/parser/package.json#L75

Essentially, I wanted to run something like yarn upgrade libpg-query or npm update libpg-query to update the version of libpg-query under the package.json within the parser folder of packages, but it's not really working.

If I did the npm one, it creates a package-lock.json at the root directory, which I'm assuming is not the desired behavior or directory setup we want.

If I do the yarn one, I get the following error trace:

yarn upgrade v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-8f9024cc-8e7d-4119-9187-75915c1dade1 > lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/[email protected]" has unmet peer dependency "@octokit/core@>=3".
error An unexpected error occurred: "expected workspace package to exist for \"jest-config\"".
info If you think this is a bug, please open a bug report with the information provided in "..../yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.

For context, I ran both commands at the parser folder level.

@data-envoy
Copy link

It think first yarn install from root. Then cd to parser package and yarn upgrade ....

You're right about package-lock.json not being right, I agree because of *yarn* files in the root dir.

@nith2001
Copy link

nith2001 commented Apr 4, 2023

I'm guessing we need to run through some of the commands listed in here before actually doing anything?

@nith2001
Copy link

nith2001 commented Apr 5, 2023

Update: I basically recloned and followed the steps as dictated by the Github workflow and from what you suggested about the upgrade and got the following error trace:

(base) vikram@Mr-Kram-2 parser % yarn upgrade libpg-query
yarn upgrade v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-56c3dc5b-140f-4251-9394-8ef88db5bf71 > lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/[email protected]" has unmet peer dependency "@octokit/core@>=3".
error An unexpected error occurred: "expected workspace package to exist for \"jest-config\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/vikram/Documents/GitHub/pgsql-parser/packages/parser/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.

Edit: This seems to be an ongoing issue: yarnpkg/yarn#7807, but despite reverting to an older version of yarn, I still get the above error trace.

@nith2001
Copy link

nith2001 commented Apr 5, 2023

Ok, this was a bit of a hack, but I just followed this comment and edited the libpg-query version field in the package.json file manually to 15.0.2 and then I ran yarn install at the root directory and I'm pretty sure it worked. On to debugging!

@pyramation
Copy link
Collaborator Author

#92 (comment)

When I attempted this, the string type was changed — so some of the messages and node parsing needed to be updated. Would love to take a PR for this — and it would also allow for 15 to happen as well.

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

3 participants