-
Notifications
You must be signed in to change notification settings - Fork 28
chore: Makefile tweaks #841
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
Conversation
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
# install SLSA verifier binary, download mvnw, and gradlew. | ||
.PHONY: setup | ||
setup: force-upgrade setup-go setup-binaries setup-schemastore | ||
ifeq ($(PRE_COMMIT_HOOKS),false) |
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.
What's the reason to make pre-commit
optional? Our development environment requires pre-commit
hooks.
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.
This is purely for dev convenience & is also related to the 3rd party(Souffle) build break.
make setup
triggers the pre-commit
hooks and because tests fail (as expected), build
/setup
step is blocked as a result.
souffle: | ||
if ! command -v souffle; then \ | ||
ifeq ($(INSTALL_SOUFFLE),false) | ||
$(warning "Skipping Souffle installation. Set INSTALL_SOUFFLE=true to install.") |
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 assume you are trying to optionally disable the Souffle installation, but the implementation below should have handled that. Did you get this error on your macOS?
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.
No, the brew
command failed for me instead. AFAIK, command -v <tool>
only checks if <tool>
exists in the system path. My issue is that Souffle's homebrew package's M* OSX build is broken.
@if [ -f .venv/upgraded-on ]; then \ | ||
rm -f .venv/upgraded-on; \ | ||
else \ | ||
rm -f ${VIRTUAL_ENV}/upgraded-on; \ |
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.
Can you please provide more details? What was the original issue?
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'll add more details in the PR description but TL;DR - if a user is using a Python version manager such as pyenv
to manage virtual envs, the make
script fails because it's looking for a hardcoded file that's probably specific to venv
.
pyenv
for instance sets the VIRTUAL_ENV
variable so appending the upgraded-on
file to it's path fixes the breakage.
$ echo $VIRTUAL_ENV
... <nothing here> ...
$ pyenv activate oracle@macaron
... <nothing here> ...
(oracle@macaron) $ echo $VIRTUAL_ENV
/Users/harish/.pyenv/versions/3.11.9/envs/oracle@macaron
@behnazh-w I triggered a CI build on my fork which looks green. Let me know if there are any failures here. |
Weirdly, I needed to explicitly set-up |
Closing this PR as the development checks can be skipped using |
pyenv
)souffle
installation (souffle
builds for OSX are broken: https://github.com/souffle-lang/homebrew-souffle/issues)