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

Makefile: improve confusing errors in inclusion #492

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

mtzguido
Copy link
Member

@mtzguido mtzguido commented Oct 14, 2024

This line gives some bad errors whenever ocamlfind is not in the
PATH or the visitors package is not installed, and may carry on
with the Makefile regardless of that failure (attempting to include
/Makefile.preprocess along the way).

    $ make
    make: ocamlfind: No such file or directory
    Makefile:2: /Makefile.preprocess: No such file or directory
    make: *** No rule to make target '/Makefile.preprocess'.  Stop.

This patch makes the Makefile provide more helpful errors in both these
situations:

    $ make
    make: ocamlfind: No such file or directory
    Makefile:7: *** "'ocamlfind query' failed, please install OCaml and put it in your PATH.  Stop.

    $ make
    ocamlfind: Package `visitors' not found
    Makefile:11: *** "'ocamlfind query visitors' failed, please 'opam install visitors'.  Stop.

@msprotz
Copy link
Contributor

msprotz commented Oct 14, 2024

I've on occasion needed this to debug some visitors-related stuff, so if there's an easy to make it work out, I'm all for it, otherwise don't waste time! Thanks.

@mtzguido
Copy link
Member Author

Ah sounds good, let me update the PR with the robust check then.

@mtzguido
Copy link
Member Author

Done

@mtzguido mtzguido changed the title Makefile: remove inclusion which leads to confusing errors Makefile: improve confusing errors in inclusion Oct 14, 2024
This line gives some bad errors whenever ocamlfind is not in the
PATH or the visitors package is not installed, and may carry on
with the Makefile regardless of that failure (attempting to include
/Makefile.preprocess along the way).

	$ make
	make: ocamlfind: No such file or directory
	Makefile:2: /Makefile.preprocess: No such file or directory
	make: *** No rule to make target '/Makefile.preprocess'.  Stop.

This patch makes the Makefile provide more helpful errors in both these
situations:

	$ make
	make: ocamlfind: No such file or directory
	Makefile:7: *** "'ocamlfind query' failed, please install OCaml and put it in your PATH.  Stop.

	$ make
	ocamlfind: Package `visitors' not found
	Makefile:11: *** "'ocamlfind query visitors' failed, please 'opam install visitors'.  Stop.
Copy link
Contributor

@msprotz msprotz left a comment

Choose a reason for hiding this comment

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

Awesome thank you!

@msprotz msprotz merged commit c31a22c into FStarLang:master Oct 14, 2024
1 check passed
@mtzguido mtzguido deleted the noinc branch October 14, 2024 21:21
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.

2 participants