From: stephan Date: Sat, 9 Sep 2023 11:20:35 +0000 (+0000) Subject: In the JNI build, emit a reminder to not check in the javac-generated sqlite3-jni... X-Git-Tag: version-3.44.0~216^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fjni-client-data;p=thirdparty%2Fsqlite.git In the JNI build, emit a reminder to not check in the javac-generated sqlite3-jni.h when FTS5 is disabled because changes in that feature flag result in unnecessary and large diffs in checked-in generated code. FossilOrigin-Name: caceb52fb58f924e7cbbebac05e7fd7822b7f6f56a3f834392d2be801bf04633 --- diff --git a/ext/jni/GNUmakefile b/ext/jni/GNUmakefile index 36fa43332d..ce9df06d49 100644 --- a/ext/jni/GNUmakefile +++ b/ext/jni/GNUmakefile @@ -27,6 +27,7 @@ dir.bld := $(dir.jni)/bld dir.bld.c := $(dir.bld) dir.src.jni := $(dir.src)/org/sqlite/jni dir.src.jni.tester := $(dir.src.jni)/tester +dir.src.fts5 := $(dir.src.jni)/fts5 mkdir ?= mkdir -p $(dir.bld.c): $(mkdir) $@ @@ -54,6 +55,11 @@ SQLTester.class := $(SQLTester.java:.java=.class) # The pieces are all in place, and are all thin proxies so not much # complexity, but some semantic changes were required in porting # which are largely untested. +# +# Reminder: this flag influences the contents of $(sqlite3-jni.h), +# which is checked in. Please do not check in changes to that file in +# which the fts5 APIs have been stripped unless that feature is +# intended to be stripped for good. enable.fts5 ?= 0 # If enable.tester is 0, the org/sqlite/jni/tester/* bits are elided. enable.tester ?= $(if $(wildcard $(dir.src.jni.tester)/SQLTester.java),1,0) @@ -105,7 +111,6 @@ JAVA_FILES.unittest := $(patsubst %,$(dir.src.jni)/%,\ Tester1.java \ ) ifeq (1,$(enable.fts5)) - dir.src.fts5 := $(dir.src.jni)/fts5 JAVA_FILES.main += $(patsubst %,$(dir.src.fts5)/%,\ fts5_api.java \ fts5_extension_function.java \ @@ -221,16 +226,15 @@ java.with.jni := define ADD_JNI_H sqlite3-jni.h.in += $$(dir.bld.c)/org_sqlite_jni$(3)_$(2).h java.with.jni += $(1)/$(2).java -$$(info x=$(1)/$(2).java) $$(dir.bld.c)/org_sqlite_jni$(3)_$(2).h: $(1)/$(2).java endef # Invoke ADD_JNI_H once for each Java file which includes JNI # declarations: $(eval $(call ADD_JNI_H,$(dir.src.jni),SQLite3Jni,)) -ifeq (1,$(enable.fts5)) - $(eval $(call ADD_JNI_H,$(dir.src.fts5),Fts5ExtensionApi,_fts5)) - $(eval $(call ADD_JNI_H,$(dir.src.fts5),fts5_api,_fts5)) - $(eval $(call ADD_JNI_H,$(dir.src.fts5),fts5_tokenizer,_fts5)) +ifeq (,$(enable.fts5)) + $(eval $(call ADD_JNI_H,$(dir.src.fts5),Fts5ExtensionApi,_fts5)) + $(eval $(call ADD_JNI_H,$(dir.src.fts5),fts5_api,_fts5)) + $(eval $(call ADD_JNI_H,$(dir.src.fts5),fts5_tokenizer,_fts5)) endif ifeq (1,$(enable.tester)) $(eval $(call ADD_JNI_H,$(dir.src.jni.tester),SQLTester,_tester)) @@ -259,13 +263,17 @@ ifeq (1,$(enable.tester)) endif $(sqlite3-jni.h): $(sqlite3-jni.h.in) $(MAKEFILE) @cat $(sqlite3-jni.h.in) > $@.tmp - @if cmp $@ $@.tmp; then \ + @if cmp $@ $@.tmp >/dev/null; then \ rm -f $@.tmp; \ echo "$@ not modified"; \ else \ mv $@.tmp $@; \ echo "Updated $@"; \ fi + @if [ x1 != x$(enable.fts5) ]; then \ + echo "*** REMINDER:"; \ + echo "*** enable.fts5=0, so please do not check in changes to $@."; \ + fi $(package.dll): $(sqlite3-jni.h) $(sqlite3.c) $(sqlite3.h) $(package.dll): $(sqlite3-jni.c) $(MAKEFILE) diff --git a/manifest b/manifest index 4b175c8c08..96e075e3e3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Disable\sFTS5\sin\sthe\sJNI\sbuild\sby\sdefault\suntil\sit\scan\sbe\sthoroughly\stested.\sThis\sis\smainly\sso\sthat\sthe\spublic-facing\sjavadoc\sdoes\snot\sinclude\sit. -D 2023-09-09T07:52:05.442 +C In\sthe\sJNI\sbuild,\semit\sa\sreminder\sto\snot\scheck\sin\sthe\sjavac-generated\ssqlite3-jni.h\swhen\sFTS5\sis\sdisabled\sbecause\schanges\sin\sthat\sfeature\sflag\sresult\sin\sunnecessary\sand\slarge\sdiffs\sin\schecked-in\sgenerated\scode. +D 2023-09-09T11:20:35.287 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -234,7 +234,7 @@ F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c F ext/icu/README.txt 7ab7ced8ae78e3a645b57e78570ff589d4c672b71370f5aa9e1cd7024f400fc9 F ext/icu/icu.c c074519b46baa484bb5396c7e01e051034da8884bad1a1cb7f09bbe6be3f0282 F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a32075a8 -F ext/jni/GNUmakefile 5747f8527812d6cfeb87e454e21a491b202779e5166f05ff8b83193eb1611a17 +F ext/jni/GNUmakefile 4c17706c4cfb228ae15b8ad102d03c0d2c73e238283beb78bf16f2e169f8b5d8 F ext/jni/README.md 1332b1fa27918bd5d9ca2d0d4f3ac3a6ab86b9e3699dc5bfe32904a027f3d2a9 F ext/jni/jar-dist.make 030aaa4ae71dd86e4ec5e7c1e6cd86f9dfa47c4592c070d2e35157e42498e1fa F ext/jni/src/c/sqlite3-jni.c 438a0141b7be7e8081f23254efe4cb313170aeb0f12fc5dd2c5a42612111bfad @@ -2117,8 +2117,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 4c773e1f331cd5854d4c6e8825197933c0bb6827b7437e56ac0ad650d1ddf55e -R fea65675bc6031bd63acb193611317be +P 6f25f02b70f561864264a71a85cb5efa05550743371fd655804033ea08d00f33 +R f22f4a812c24f83688caa4bfc7503f7a U stephan -Z 0e1bc36bc0c5e207b09e65fd958851e4 +Z 971962c4cee26a6c821e73047cd57ddc # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 11cf3a484c..bc48f5e526 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6f25f02b70f561864264a71a85cb5efa05550743371fd655804033ea08d00f33 \ No newline at end of file +caceb52fb58f924e7cbbebac05e7fd7822b7f6f56a3f834392d2be801bf04633 \ No newline at end of file