-
Notifications
You must be signed in to change notification settings - Fork 412
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
The Go driver becomes "undefined: parser", and the application cannot be built. #1455
Comments
I think the reason behind this might be broken antlr dependencies, which are ridden with issues such as invalid function signatures and seem pretty low maintenance, so I'll try discussing ditching these with the project maintainers. I've tried using pgx as an alternative but it causes a memory leak while scanning 😞. @maehara-n, did you figure out any temporary solution? |
@maehara-n You need to build those files by executing generate.sh -
|
Both the README and install.sh files aren't very good. If you look at the install file, you will basically need to -
After that you should be good to go. |
@jrgemignani Prepare the JAVA environment, follow the steps to create the files, and place the files to eliminate the errors. |
@maehara-n The JAVA environment is up to the user to provide as is the database connection information. The other stuff, yeah, if it is stated to be automatic or automated, it isn't. The individual who wrote the scripts didn't write them very well. We will need to fix them. But, this is an open source project and it can be hard to manage all of the community provided code. As for having to manually generate files, that shouldn't be an issue for you, provided the documentation either states how to do it or there are scripts to do it automatically. |
@jrgemignani The explanation you provided seems to be for setting up the development environment of Apache AGE. |
@mjholub We specify the following older version in go.mod. |
@maehara-n What I gave are directions for building the Go driver for AGE. Building it requires JAVA and ANTLR to be installed. |
@jrgemignani You suggested that building is possible if the generated file is placed, but where exactly should it be placed? Can you please provide more specific information? The following steps can reproduce the error when creating the application: Create a directory named "myapp"
Run the following command: |
@maehara-n Building requires -
As I mentioned, the Once the above criteria are met, the parser and lexer can be built in the |
Update - I need to clarify that the All of the changes are now in the master branch. |
@jrgemignani I have reviewed the update, but it will not solve the problem.
However, my "myapp" project is structured as follows:
The content of go.mod is:
There is no "install.sh" in myapp project and Java is not installed either. |
Which file(s) are you referring to? The ones in parser? |
@jrgemignani The code for "myapp" is just importing and using "github.com/apache/age/drivers/golang/age". "myapp" project is structured as follows:
main.go
sql_api_sample.go
age_wrapper_sample.go
If I describe go.mod as follows, the build will fail.
If I describe go.mod as follows, the build will succeed.
|
@maehara-n If you can get it to work with your app, then I'm not sure what the issue is. The most that I can do is to add, remove, or update files, if necessary. I am only able to test the installation with the included test app which works on my end. |
@jrgemignani The problem is not resolved. Have you checked the version of the go driver I wrote?
After the fix mentioned in pull request 714 was made, the go driver no longer builds successfully. A pull request was created to address this issue, but it has been left unattended: To make the build successful, one of the following actions needs to be taken:
|
@maehara-n I feel like we're using the driver two different ways and that is causing some confusion - You are using it as, what sounds like, a prebuilt package. Whereas, I'm using it and building it (as are the Github CI scripts), as necessary. Those components are automatically built for me, but apparently not for you. I can't revert #714 as it has security improvements. I can't merge #1205 as there have been updates to the driver since that PR. Additionally, @mjholub submitted a PR #1504 to make changes. Unfortunately, I'm not an expert, or even a novice, at Golang so bare with me. If necessary, I will just update the whole driver and add those files back in. |
I will also add PR #1203 to the mix as needing review. |
@maehara-n I have created PR #1582 to add in those files. Please check that PR out locally to see if it corrects your issue. Please understand that it still needs to be reviewed and approved by others on the team. There is no guarantee that they will necessarily agree with providing files that can be built by the user. By verifying that this PR corrects the issue for you, it may help with consideration. |
@jrgemignani I have looked at PR #1582 . It seems like it might solve this issue. |
@maehara-n Could you verify this by pulling down the PR and testing it? I would rather not merge a PR that doesn't resolve an issue. Might, isn't compelling enough especially since everything on my side works without this PR. |
@sanket-uptycs This looks to be the same error from above. Could you try either building those parser files or testing out the PR linked above, which may resolve it? |
@jrgemignani I tried building files using generate.sh and was able to generate files successfully. on which #1582 is targeted. Also if I build drivers from the source no errors at all on the master branch. But if we build module from the source and import it then it works fine. Could be a configuration issue? |
@sanket-uptycs I think there may be a mismatch in the specified version. You need to specify the following version. @jrgemignani I was able to successfully build the application by specifying the go.mod as follows.
|
@jrgemignani The issue will be resolved by #1582. |
@jrgemignani @maehara-n My bad, missed to specify the version. |
I will have a team member look at merging #1582 |
@sanket-uptycs @maehara-n The master branch has been updated. Please verify that this resolves the issue, and if so, close the ticket :) |
Verified on the latest master branch. we can close the issue. |
@sanket-uptycs @maehara-n Once this is closed, I will push create PRs for the other branches. |
@jrgemignani Thank you for your support. |
@jrgemignani Thanks man ! |
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This resolves issue apache#1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue #1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue #1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue #1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue #1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This addresses issue #1455
Updated Go installation and added in built parser files. While the parser files can be built by the user, there may be instances where the user doesn't have the ability to do so. For the latter case, they have been added. modified: drivers/golang/go.mod modified: drivers/golang/go.sum new file: drivers/golang/parser/age_base_listener.go new file: drivers/golang/parser/age_base_visitor.go new file: drivers/golang/parser/age_lexer.go new file: drivers/golang/parser/age_listener.go new file: drivers/golang/parser/age_parser.go new file: drivers/golang/parser/age_visitor.go This resolves issue #1455
Describe the bug
When trying to build an application that uses the Go driver, an error occurs. "undefined: parser" is output by the Go driver.
What data setup do we need to do?
What is the necessary configuration info needed?
Specify the following version of the Go driver in go.mod.
What is the command that caused the error?
Build the application that is using the Go driver.
Expected behavior
The application can be built.
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: