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

make check: check for parallel/wget/curl, fix #157 #158

Closed
wants to merge 1 commit into from
Closed

Conversation

kba
Copy link
Member

@kba kba commented Aug 20, 2020

No description provided.

@kba kba marked this pull request as draft August 20, 2020 13:38
@kba kba requested review from stweil and bertsky and removed request for stweil August 20, 2020 13:38
Comment on lines +65 to +68
.PHONY: all modules check clean help show always-update

check:
@sem --version >/dev/null && echo "ok - parallel installed"
Copy link
Collaborator

@stweil stweil Aug 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then an error would be reported like this:

/bin/sh: 1: sem: not found

Suggested change
.PHONY: all modules check clean help show always-update
check:
@sem --version >/dev/null && echo "ok - parallel installed"
.PHONY: all modules check clean help show always-update
check:
@sem --version >/dev/null 2>&1 || echo "error - please run 'sudo make deps-ubuntu' or install GNU parallel manually"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong opinion regarding the success message, so ok - parallel installed could be added for the success case if desired.

Copy link
Collaborator

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point. You already get appropriate error messages now when one of these tools is missing. No need to duplicate that under a new target. It will only confuse users. Other missing dependencies will produce errors when due, respectively.


check:
@sem --version >/dev/null && echo "ok - parallel installed"
@{ wget --version || curl --version; } > /dev/null && echo "ok - wget/curl installed"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we already have hard dependencies on wget, cleaning the current code would be reasonable - no need to support curl as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point. You already get appropriate error messages now when one of these tools is missing. No need to duplicate that under a new target. It will only confuse users. Other missing dependencies will produce errors when due, respectively.

I see this more as a documentation feature. If users do encounter problems, you could ask them: "What does make check say?" to quickly exclude missing dependencies. I'd say that is easier than capturing make all output and spot the error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> As we already have hard dependencies on wget, cleaning the current code would be reasonable - no need to support curl` as well.

Since the $(WGET) macro checks wget --version, then curl --version, make check should also check in that order. The || should stop early if wget is available and test whether curl is available only if wget isn't.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this more as a documentation feature. If users do encounter problems, you could ask them: "What does make check say?" to quickly exclude missing dependencies. I'd say that is easier than capturing make all output and spot the error.

What do you gain? – Nothing. Whether wget and parallel is missing is already reported by make all – at the very bottom (unless running parallel and for the first time).

What do you loose? – All the other possible sources of error. You'll usually have to ask for make all output anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaning the WGET macro to only use wgetis a separate task which can be done before or after this PR (but please in a separate PR). I just wanted to say that there is no need to support curl here and to remove that later again.

make deps-ubuntu installs wget.

Copy link
Collaborator

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error messages should be added / improved, and instead of checking for curl or wget, a check for wget only would be better.

@cneud
Copy link
Member

cneud commented Aug 24, 2020

Just to note that curl is required for the OCR-D Research Data Repository and since this is included with taverna_workflow, users of that will see their workflows fail when curl is not installed by ocrd_all.

@stweil
Copy link
Collaborator

stweil commented Aug 29, 2020

Just to note that curl is required for the OCR-D Research Data Repository and since this is included with taverna_workflow, users of that will see their workflows fail when curl is not installed by ocrd_all.

make deps-ubuntu already installs wget. Should it also install curl then?

As far as I remember, a default installation of Ubuntu already includes curl, so most users will have it. For those who install a minimal Ubuntu adding curl to CUSTOM_DEPS might be a good idea.

@paulpestov paulpestov added this to Ideas in coordinate_all Aug 30, 2021
@paulpestov paulpestov removed this from Ideas in coordinate_all Aug 30, 2021
@paulpestov paulpestov added this to Open in coordinate_all_pr Sep 15, 2021
@kba
Copy link
Member Author

kba commented Feb 2, 2022

We have since introduced a different check target and I see no point in moving forward with this PR.

@kba kba closed this Feb 2, 2022
@kba kba deleted the make-check branch February 2, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants