-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Fix compile-database target #59980
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
Fix compile-database target #59980
Conversation
Also fix race conditions caused by targets producing files being incorrectly marked as phony.
|
Thanks for looking into this! I'll try this with the Yggdrasil script in the morning. Could you please also add a backport-1.13 label? |
vtjnash
left a comment
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.
The .PHONY is correct. Even though (or especially because) it does produce a file, it needs to be forced to re-generate it to be updated
|
Can you change the |
with this patch added, the issue happens a lot less often, but I still experience it. |
|
@vtjnash ah, I see. OK, calling a target I note that on my MacBook Pro M1 Max, the build system takes a full 2 seconds to rebuild these compile databases which I don't even use :-/. A better fix would be to make it non-PHONY by properly tracking the dependencies; as far as as I can tell, that means tracking the content of @lgoettgens for you the much simpler fix should be to apply this patch: diff --git a/src/Makefile b/src/Makefile
index 18e9a4a639..f92cd73a10 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -259,7 +259,7 @@ endif
default: $(JULIA_BUILD_MODE) # contains either "debug" or "release"
all: debug release
-release debug: %: libjulia-internal-% libjulia-codegen-% $(BUILDDIR)/compile_commands.json
+release debug: %: libjulia-internal-% libjulia-codegen-%
$(BUILDDIR):
mkdir -p $(BUILDDIR)
diff --git a/src/flisp/Makefile b/src/flisp/Makefile
index 135859eacb..98b336fb14 100644
--- a/src/flisp/Makefile
+++ b/src/flisp/Makefile
@@ -61,9 +61,9 @@ DEBUGFLAGS_COMMON += $(FLAGS_COMMON)
default: release
-release: $(BUILDDIR)/$(EXENAME)$(EXE) $(BUILDDIR)/compile_commands.json
+release: $(BUILDDIR)/$(EXENAME)$(EXE)
-debug: $(BUILDDIR)/$(EXENAME)-debug$(EXE) $(BUILDDIR)/compile_commands.json
+debug: $(BUILDDIR)/$(EXENAME)-debug$(EXE)
$(BUILDDIR):
mkdir -p $(BUILDDIR)
diff --git a/src/support/Makefile b/src/support/Makefile
index 2b48a20bbc..3c1dba17f8 100644
--- a/src/support/Makefile
+++ b/src/support/Makefile
@@ -53,8 +53,8 @@ $(BUILDDIR)/host/Makefile:
@printf "%s\n" 'BUILDING_HOST_TOOLS=1' >> $@
@printf "%s\n" 'include $(SRCDIR)/Makefile' >> $@
-release: $(BUILDDIR)/libsupport.a $(BUILDDIR)/compile_commands.json
-debug: $(BUILDDIR)/libsupport-debug.a $(BUILDDIR)/compile_commands.json
+release: $(BUILDDIR)/libsupport.a
+debug: $(BUILDDIR)/libsupport-debug.a
$(BUILDDIR)/libsupport.a: $(OBJS) | $(BUILDIR)
rm -rf $@ |
|
updated |
|
Could someone please add a backport 1.13 label? |
|
It looks like this caused a subset of our CI workers to break: https://buildkite.com/julialang/julia-master/builds/51883#019a4b0f-2de2-40f8-9622-bf5187edcfb6 It appears you need to use |
Also fix race conditions caused by targets producing files being incorrectly marked as phony. Follow up to #59476 (guess there is a price to pay for using Claude) @lgoettgens that might help with the issues you are seeing in JuliaPackaging/Yggdrasil#12406 (cherry picked from commit ff602d4)
|
I've been using Anyway, not sure what you mean by "the -p option was only added this year" ? Added where? The Not sure when GNU added it, but this man page from 2010 shows it was around then, too So perhaps it is missing somewhere, but I am not sure what the "added last year" amounts to. Interestingly, in the buildkite log you linked, searching for without any error. (Note that Unfortunately I have no idea how the Buildkite build environments look like. E.h. is this |
This comment was marked as resolved.
This comment was marked as resolved.
|
It was not in 12, added in 14 (late 2023): https://man.freebsd.org/cgi/man.cgi?query=mktemp&apropos=0&sektion=0&manpath=macOS+14.8&arch=default&format=html |
It is not supported in macOS 13 userland which causes CI failures. For background info [see here](#59980 (comment)). This is a subset of PR #60080 but unlike that, it only solves the specific issue causing trouble in CI right now, and does not attempt to resolve a bunch of other things -- which may very well all be fine and nice and desirable, but it's quite a bit more to review.
Also fix race conditions caused by targets producing files being incorrectly marked as phony.
Follow up to #59476 (guess there is a price to pay for using Claude)
@lgoettgens that might help with the issues you are seeing in JuliaPackaging/Yggdrasil#12406