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

package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language@upgrade found, but does not contain package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser #23

Open
stripathiws opened this issue Apr 16, 2021 · 7 comments
Labels

Comments

@stripathiws
Copy link

Is there any setup guidelines for healthcare-data-harmonization project?

Below are the steps I followed to setup on my local filesystem and the issues I am facing

  1. Installed and configured below pre-requisites.
  • Golang (>= 1.13)
  • Java JDK (>= 8)
  • Protobuf Compiler protoc (>= 3.11.4)
  1. Cloned the git repo on my windows laptop
  2. Executed build_all.sh which is throwing error as "cannot remove './parser/*.tokens': no such file or directory".
    Note: Getting same error for all the individual build files.
  3. Tried building mapping_engine/main go modules, it says package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language@upgrade found, but does not contain package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser

Does this can be setup and executed only using docker image or on cloud? I am new to this so might be doing some mistake here, please help me catch it.

@random-whistler
Copy link

@stripathiws I don't think there is a docker image yet. Could you dump the full trace when you run build_all.sh? I just did a clean build, and did not run into the issue you pointed out.

@stripathiws
Copy link
Author

stripathiws commented Apr 16, 2021

@random-whistler I was able to pass the remove file error by keeping some dummy files, after that I get below error:

$ bash build_all.sh
Entering /d/healthcare-data-harmonization/mapping_engine
go: downloading github.com/google/go-cmp v0.5.0
Entering /d/healthcare-data-harmonization/mapping_engine/main
....\mapping_language\transpiler\block.go:18:2: no required module provides package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser; to add it:
go get github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser

Then I tried both Update and get but it still throws below error but the folder and file same as repo is present

go get github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser
go: downloading github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language v0.0.0-20210416201613-2d878a3bb371
go: downloading github.com/GoogleCloudPlatform/healthcare-data-harmonization v0.0.0-20210416201613-2d878a3bb371
go get: module github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language@upgrade found (v0.0.0-20210416201613-2d878a3bb371), but does not contain package github.com/GoogleCloudPlatform/healthcare-data-harmonization/mapping_language/parser

@random-whistler
Copy link

What do you get if you run
$ ls -l mapping_language/parser/

Do you get all following 7 files?
whistle_base_listener.go whistle_base_visitor.go Whistle.g4 whistle_lexer.go whistle_listener.go whistle_parser.go whistle_visitor.go

Also what's your go version? If it's not latest, please consider updating to a newer version. I got a successful build with v1.6.3:
$ go version
go version go1.16.3 linux/amd64

@stripathiws
Copy link
Author

stripathiws commented Apr 17, 2021

mapping_language/parser/ just has 1 file which is in sync with repo.
Whistle.g4

$go version
go version go1.16.3 windows/amd64

Did you created any service roles on GCP? or just downloaded this repo and executed build_all.sh?

@random-whistler
Copy link

Do you have antlr installed on your machine? It's required to convert Whistle.g4 into code. Please try to install ANTLR and give it another try.

If it still doesn't work, according to README.md under mapping_language, this should be solved by an extra manual step:
"The whistle_*.go files in the parser directory are generated by ANTLR. If you modify the grammar (Whistle.g4) file make sure to re-run generate_grammar.sh or build.sh."

@stripathiws
Copy link
Author

stripathiws commented Apr 19, 2021

Finally, I was able to build the project. following 7 files were created in mapping_language root folder then I moved them in mapping_language/parser/
whistle_base_listener.go whistle_base_visitor.go Whistle.g4 whistle_lexer.go whistle_listener.go whistle_parser.go whistle_visitor.go

Thank you for all the help. Now I am getting a new error when running the mapping_config
go run "D/healthcare-data-harmonization/mapping_engine/main" -- --input_file_spec="D/healthcare-data-harmonization/mapping_configs/hl7v2_fhir_r4/adt_a01.hl7.json" --mapping_file_spec="D/healthcare-data-harmonization/mapping_configs/hl7v2_fhir_r4/configurations/main.wstl" --lib_dir_spec="D/healthcare-data-harmonization/mapping_configs/hl7v2_fhir_r4/projector_library" --harmonize_code_dir_spec="D/healthcare-data-harmonization/mapping_configs/hl7v2_fhir_r4/code_harmonization"

Error
cannot find package "D/healthcare-data-harmonization/mapping_engine/main" in any of:
C:\Program Files\Go\src\D\healthcare-data-harmonization\mapping_engine\main (from $GOROOT)
C:\Users\tripa\go\src\D\healthcare-data-harmonization\mapping_engine\main (from $GOPATH)

Is it somehow related to issue 3?

@random-whistler
Copy link

Why do you have a "D/" prefix in all your paths? Please try updating the path to match what's on your file system, and see if it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants