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

Polish fake-aws stuff #305

Merged
merged 3 commits into from May 8, 2018
Merged

Polish fake-aws stuff #305

merged 3 commits into from May 8, 2018

Conversation

neongreen
Copy link
Contributor

No description provided.

@neongreen neongreen changed the title [WIP] Polish fake-aws stuff Polish fake-aws stuff May 3, 2018
@neongreen neongreen requested a review from jschaul May 3, 2018 18:04
@neongreen neongreen force-pushed the polish branch 2 times, most recently from 18fd28b to 1407f5a Compare May 5, 2018 08:39
@neongreen
Copy link
Contributor Author

Okay, this is probably the final design for libzauth-related things. Basically, if /usr/local is not writable then I always install libzauth locally, and always look for it locally as well.

@neongreen
Copy link
Contributor Author

neongreen commented May 5, 2018

Also, when libzauth is not found during make services we print a nice message now.

@neongreen
Copy link
Contributor Author

image

Makefile Outdated
@@ -10,11 +10,11 @@ init:

.PHONY: install
install: init
stack install --pedantic --test --local-bin-path=dist
stack install --pedantic --test --no-run-tests --local-bin-path=dist
Copy link
Member

Choose a reason for hiding this comment

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

What's your rationale for not running tests upon install ? I'm fine with not running them upon fast, but if they don't run upon install, they never run. CI would need to updated to add a line (which would be fine as such, but I'd like to know the reasoning behind not wanting to run tests upon install first).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs told me to do make services so that's what I did. Then it was running tests all the time, it was annoying, and I asked Tiago whether I could remove it. There wasn't much reasoning involved 🙂

I don't have a strong opinion about running vs. not running them on install, but it seems counter-intuitive to me that install should test anything, so I'm +0.5 on keeping the change and updating the CI instead. If you're okay with it, I'll do it.

Copy link
Member

@jschaul jschaul May 7, 2018

Choose a reason for hiding this comment

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

In my opinion, there should be one way to compile faster (no optimizations, no tests), and one way to compile slower (with more validations, i.e. tests; and resulting in optimized binaries). That's currently provided via make==make fast and make install respectively. make services (currently) depends on make install.

As I said, I think removing the tests on make install is dangerous, as it means they will probably never run (people will forget to run them - nothing indicates they can, or they should - the docs don't mention anything here). I'm not sure why you needed to run make services repeatedly, you were probably only trying to compile nginz (which a cd nginz && make would do, too, and be faster.)

Copy link
Contributor

Choose a reason for hiding this comment

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

See #312.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I said, I think removing the tests on make install is dangerous, as it means they will probably never run (people will forget to run them [...])

But if CI runs tests (as it should), why do people have to run them too?

.PHONY: check-deps
check-deps:
PKG_CONFIG_PATH=$(EXTRA_PKG_PATH) pkg-config --exists libzauth || { echo -e "\n\033[0;31m The 'libzauth' library was not found\033[0m\n pkg-config path = $(EXTRA_PKG_PATH)\n\n Suggestion: run 'make libzauth' on the top level\n"; exit 1; }

Copy link
Member

Choose a reason for hiding this comment

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

How about adding another target here:

.PHONY: libzauth
libzauth:
	$(MAKE) -C ../../libs/libzauth install

And, instead of printing a warning in the || { .. block, doing a || { echo -e "The 'libzauth' library was not found, attempting to install it..." && make libzauth ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds ok.

@neongreen
Copy link
Contributor Author

@jschaul please re-review

@neongreen neongreen merged commit b99a4bd into develop May 8, 2018
@neongreen neongreen deleted the polish branch May 8, 2018 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants