You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like the quotes are somehow being dropped on the ends of variables when we run sheets2linkml. I got this when I ran make setup. I'll dig in to the .env file and see whether I can fix something there.
I don't know why it is eating the " at the end of these variables from the variables defined at the top of the Makefile but it appears to be when we append text to the variable, so the statements $(SHEET_MODULE_PATH).tmp and $(SHEET_MODULE_PATH).tmp don't have closing ". Also, $(SHEET_MODULE_PATH) which is defined in the header as $(SOURCE_SCHEMA_DIR)/$(SHEET_MODULE).yaml has the same problem with missing the closing ".
As expected, since we have three opening " without closing " bash exits with an error stating there is a missing ", if it were an even number the line would execute but probably make a mess.
Removing quotes from the variable definition for LINKML_SCHEMA_SOURCE_PATH in env.public solves the issue and allows make setup to run the line without issues related to ".
And here is a bit of a trace from that line to how it causes the issue in the Makefile:
Thanks for feedback - unfortunately I am intermittent contributor (and my work laptop cannot access public GitHub, so I need to grab my neglected personal laptop). This issue was first raised in #106 so needs solution.
Would you be wiling to raise a PR to remove all quotes from .env.public file? @amc-corey-cox
Makefile quoting is a mess. I think the normal suggestion is to not use quotes if there aren't any spaces in the variable (definitely true for the google vars, and likely true for the path)
Looking a little deeper at this, this is actually a make file, not an environment file or a Bash script file. I think we should be more clear in how we define this.
At minimum, I will include a statement in the file that this is a make-file. I would prefer to change the name from .env.public to .vars.public.mk but I'm concerned this might cause unnecessary breakage for users using cruft to update their cookie-cutters.
For now, I'll remove the excess quotation and make a notation within the file that states it is a make-file not an env file or a bash script (it kinda looks like it could be either).
Please share your thoughts on changing the file name.
Hi !!
The file originated from me and is not community driven request - i.e. nobody requested a make file with variables.
I was testing this project with different models and encountered various problems so I raised few Issues and lot of PRs.
I focused on setting environment variables manually and/or using that file and everything eventually seemed to work.
However, issues have emerged since -- so I think I need to rethink entire solution.
Feel free to rename file - I think nobody else cares at this point - they just want bug fixed I guess so that is why I suggested removing quotes as first step.
I'm bit puzzled why I never saw errors when testing, usually I am thorough testing. Is there some extra tooling people use with makefiles? Maybe there is a linter for makefiles, I might investigate that also.
Activity
sbliven commentedon Jun 20, 2024
I ran into this too. Makefiles expect variables not to be quoted. The default
.env.public
results in errors likenoelmcloughlin commentedon Aug 18, 2024
I will have a look at this.
amc-corey-cox commentedon Aug 29, 2024
Here is my full error message:
Writing lock file
Installing the current project: sepio_linkml (0.0.0.post2.dev0+842b967)
mkdir -p src/"sepio_linkml"/datamodel
poetry run sheets2linkml --gsheet-id "19Rp5DLFS3a1Yvvw84mPupgEkCMFRKax4LXCcwX84Vbg" "release_subset_v1" > "src/sepio_linkml/schema//release_subset_v1.yaml.tmp && mv "src/sepio_linkml/schema//release_subset_v1.yaml.tmp "src/sepio_linkml/schema//release_subset_v1.yaml
bash: -c: line 1: unexpected EOF while looking for matching `"'
make: *** [Makefile:116: compile-sheets] Error 2
amc-corey-cox commentedon Aug 29, 2024
This looks like the quotes are somehow being dropped on the ends of variables when we run sheets2linkml. I got this when I ran
make setup
. I'll dig in to the .env file and see whether I can fix something there.amc-corey-cox commentedon Aug 29, 2024
This is the offending line in the Makefile:
I don't know why it is eating the
"
at the end of these variables from the variables defined at the top of the Makefile but it appears to be when we append text to the variable, so the statements$(SHEET_MODULE_PATH).tmp
and$(SHEET_MODULE_PATH).tmp
don't have closing"
. Also,$(SHEET_MODULE_PATH)
which is defined in the header as$(SOURCE_SCHEMA_DIR)/$(SHEET_MODULE).yaml
has the same problem with missing the closing"
.As expected, since we have three opening
"
without closing"
bash exits with an error stating there is a missing"
, if it were an even number the line would execute but probably make a mess.amc-corey-cox commentedon Aug 29, 2024
Removing quotes from the variable definition for
LINKML_SCHEMA_SOURCE_PATH
in env.public solves the issue and allowsmake setup
to run the line without issues related to"
.And here is a bit of a trace from that line to how it causes the issue in the Makefile:
I'm not very familiar with Makefile so I'm not sure how to solve this in the current infrastructure but I'd be happy to help.
noelmcloughlin commentedon Aug 29, 2024
Thanks for feedback - unfortunately I am intermittent contributor (and my work laptop cannot access public GitHub, so I need to grab my neglected personal laptop). This issue was first raised in #106 so needs solution.
Would you be wiling to raise a PR to remove all quotes from
.env.public
file? @amc-corey-coxThis is acceptable regression as that file is my idea and needs incremental fixing.
I raised wider discussion here: https://github.com/orgs/linkml/discussions/2296
amc-corey-cox commentedon Sep 4, 2024
@noelmcloughlin Sure, I'm happy to help out on this. I'll try just implementing your suggestion and see what we break.
sbliven commentedon Sep 4, 2024
Makefile quoting is a mess. I think the normal suggestion is to not use quotes if there aren't any spaces in the variable (definitely true for the google vars, and likely true for the path)
amc-corey-cox commentedon Sep 9, 2024
Looking a little deeper at this, this is actually a make file, not an environment file or a Bash script file. I think we should be more clear in how we define this.
At minimum, I will include a statement in the file that this is a make-file. I would prefer to change the name from .env.public to .vars.public.mk but I'm concerned this might cause unnecessary breakage for users using cruft to update their cookie-cutters.
For now, I'll remove the excess quotation and make a notation within the file that states it is a make-file not an env file or a bash script (it kinda looks like it could be either).
Please share your thoughts on changing the file name.
noelmcloughlin commentedon Sep 9, 2024
Hi !!
The file originated from me and is not community driven request - i.e. nobody requested a make file with variables.
I was testing this project with different models and encountered various problems so I raised few Issues and lot of PRs.
I focused on setting environment variables manually and/or using that file and everything eventually seemed to work.
However, issues have emerged since -- so I think I need to rethink entire solution.
Feel free to rename file - I think nobody else cares at this point - they just want bug fixed I guess so that is why I suggested removing quotes as first step.
noelmcloughlin commentedon Sep 9, 2024
I'm bit puzzled why I never saw errors when testing, usually I am thorough testing. Is there some extra tooling people use with makefiles? Maybe there is a linter for makefiles, I might investigate that also.