From aaba9661013750ad1fb439051bd88d86cea96819 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 00:22:51 -0700 Subject: [PATCH 1/8] Rediscovery changes. --- lib/filesystem.gsl | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/lib/filesystem.gsl b/lib/filesystem.gsl index 7d4355d5..b596c48b 100644 --- a/lib/filesystem.gsl +++ b/lib/filesystem.gsl @@ -98,6 +98,34 @@ function global.discover_files(files, meta, path, recurse) abort "Directory open failure: $(error_text)" endif + if defined(my.files.path) + echo "Rediscovering directory '$(my.files.path)'" + endif + + if defined(my.files.path) & !(my.files.path = my.directory.path) + abort "Directory path '$(my.files.path)' reused does not match intended assignment path '$(my.directory.path)'" + endif + + if defined(my.files.name) & !(my.files.name = my.directory.name) + abort "Directory name '$(my.files.name)' reused does not match intended assignment name '$(my.directory.name)'" + endif + + if defined(my.files.query) & !(my.files.query = my.path) + abort "Directory query '$(my.files.query)' reused does not match intended assignment path '$(my.path)'" + endif + + if defined(my.files.path) & !(my.files.path = my.directory.path) + abort "Directory path '$(my.files.path)' does not match intended '$(my.directory.path)'" + endif + + if defined(my.files.name) & !(my.files.name = my.directory.name) + abort "Directory name '$(my.files.name)' does not match intended '$(my.directory.name)'" + endif + + if defined(my.files.query) & !(my.files.query = my.path) + abort "Directory query '$(my.files.query)' does not match intended '$(my.path)'" + endif + my.files.path = my.directory.path my.files.name = my.directory.name my.files.query = my.path @@ -118,6 +146,7 @@ function global.discover_files(files, meta, path, recurse) #if !(my.modified_name = _file.name) # check for redundancy, if so skip if !(count(my.files.file, (count.name = my.modified_name)) = 0) + echo "Detected collision: $(my.modified_name) | $(_file.path)" next endif #endif @@ -157,9 +186,20 @@ function global.populate_files_from_path(path_substitutions, files, filters, fil define my.path = path_append(my.absolute_path_base, my.files_path.path) define my.recurse = is_defined_positive(my.files_path, "recursive") - new my.files.directory as _directory - discover_files(_directory, my.filters, my.path, my.recurse) - endnew + if (count(my.files.directory, this.path = "$(my.path)/", this) > 0) + # echo "Repopulating '$(my.path)'" + define my.matched_directory = my.files->directory(this.path = "$(my.path)/", this) + discover_files(my.matched_directory, my.filters, my.path, my.recurse) + else + # echo "Populating '$(my.path)'" + # for my.files.directory as _directory + # echo " Existing: $(_directory.path)" + # endfor + + new my.files.directory as _directory + discover_files(_directory, my.filters, my.path, my.recurse) + endnew + endif new my.path_substitutions.substitution as _sub _sub.absolute_path = my.path From c4b8443c814653f4d983d955b1a59f8325999016 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 12:39:18 -0700 Subject: [PATCH 2/8] On BUILD_SKIP_TESTS, disable tests for libbitcoin projects. --- templates/shell/install-bash.gsl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/shell/install-bash.gsl b/templates/shell/install-bash.gsl index dbfdc1ef..758a8933 100644 --- a/templates/shell/install-bash.gsl +++ b/templates/shell/install-bash.gsl @@ -1401,6 +1401,16 @@ $(my.indent)msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}" exit 1 fi + if [[ "${BUILD_SKIP_TESTS}" == "yes" ]]; then +. if defined(my.meta->build(build.method = "cmake")) + CONFIGURE_OPTIONS_CMAKE=( "${CONFIGURE_OPTIONS_CMAKE[@]}" "-Dwith-tests=OFF" ) +. endif +. +. if defined(my.meta->build(build.method = "gnu")) + CONFIGURE_OPTIONS_GNU=( "${CONFIGURE_OPTIONS_GNU[@]}" "--without-tests" ) +. endif + fi + # --prefix if [[ -z "${PREFIX}" ]]; then # Always set a prefix (required for OSX and lib detection). From 64c570000440566414864b2bdc544fe490bc6583 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 15:18:59 -0700 Subject: [PATCH 3/8] Make sort ordering simpler, preproces conflict detection so as to denote first element as needing ObjectFileName as well. --- templates/msbuild/vcxproj.gsl | 141 ++++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 48 deletions(-) diff --git a/templates/msbuild/vcxproj.gsl b/templates/msbuild/vcxproj.gsl index fd64c94d..d0553407 100644 --- a/templates/msbuild/vcxproj.gsl +++ b/templates/msbuild/vcxproj.gsl @@ -97,6 +97,74 @@ function nuget_target(package) return "$(my.prefix)/$(my.relative_path)/$(my.targets_file)" endfunction +function linearize_sources(result, files, substitutions, filters, disambiguation_type) + define my.result = linearize_sources.result + define my.files = linearize_sources.files + define my.substitutions = linearize_sources.substitutions + define my.filters = linearize_sources.filters + define my.disambiguation_type = linearize_sources.disambiguation_type? + + for my.files.file as _file where matches_filters(my.filters, _file.name) + define my.applicable_sub = matches_substitution(my.substitutions, _file.path) + + define my.sanitized_path = string.substr(_file.path, \ + string.length(my.applicable_sub.absolute_path), string.length(_file.path) - 1) + + define my.filename = path_append(my.applicable_sub.relative_path_prefix, \ + path_append(my.sanitized_path, _file.name)) + + define my.filter_path = my.sanitized_path + + if defined(my.applicable_sub.filter) + my.filter_path = path_append(my.applicable_sub.filter, my.sanitized_path) + endif + + if ends_with(my.filter_path, "/") + my.filter_path = string.substr(my.filter_path, 0, \ + string.length(my.filter_path) - 2) + endif + + + new my.result.item as _item + _item.name = my.filename + if defined(my.disambiguation_type) + define my.splitpoint = string.locate_last(_file.name, ".") + _item.collision_name = string.substr(_file.name, 0, my.splitpoint - 1) + + define my.path_to_prefix = string.replace(my.sanitized_path, "/|_") + _item.disambiguated = "$(my.applicable_sub.unprefixed_path)$(my.path_to_prefix)$(_item.collision_name).$(my.disambiguation_type)" + endif + endnew + endfor + + for my.files.directory as _directory + linearize_sources(my.result, _directory, my.substitutions, my.filters, \ + my.disambiguation_type) + endfor +endfunction + +function annotate_conflicts(items) + define my.items = annotate_conflicts.items + + new names as _names + for my.items.item as _item by _item.collision_name + if (count(_names.item, this.name = _item.collision_name, this) > 0) + _names->item(this.name = _item.collision_name, this).deconflict = 1 + else + new _names.item as _identifier + _identifier.name = _item.collision_name + endnew + endif + endfor + + for _names.item as _identifier where defined(_identifier.deconflict) + for my.items.item as _item where _item.collision_name = _identifier.name + _item.has_conflict = 1 + endfor + endfor + endnew +endfunction + ############################################################################### # Generation ############################################################################### @@ -159,23 +227,35 @@ endfunction . # ClCompile -. new conflicts as _conflicts -. emit_items("ClCompile", _files, _substitutions, \ - my.meta->sources, my.item_indent, _conflicts) +. new items as _items +. linearize_sources(_items, _files, _substitutions, my.meta->sources, "obj") +. annotate_conflicts(_items) +. emit_items("ClCompile", _items, my.item_indent) . endnew . # ClInclude -. emit_items("ClInclude", _files, _substitutions, my.meta->headers, my.item_indent) +. new items as _items +. linearize_sources(_items, _files, _substitutions, my.meta->headers) +. emit_items("ClInclude", _items, my.item_indent) +. endnew . # None -. emit_items("None", _files, _substitutions, my.meta->other, my.item_indent) - +. new items as _items +. linearize_sources(_items, _files, _substitutions, my.meta->other) +. new _items.item as _packagesconfig +. _packagesconfig.name = "packages.config" +. endnew +. emit_items("None", _items, my.item_indent) +. endnew . # ResourceCompile -. emit_items("ResourceCompile", _files, _substitutions, my.meta->resource, my.item_indent) +. new items as _items +. linearize_sources(_items, _files, _substitutions, my.meta->resource) +. emit_items("ResourceCompile", _items, my.item_indent) +. endnew . emit_import_projects(my.target, my.repository, my.configuration, \ my.toolchain, my.toolset, my.meta, " ") @@ -226,56 +306,21 @@ $(my.indent) . .endmacro # emit_project_configuration . -.macro emit_items(item_name, files, substitutions, filters, indent, conflicts) +.macro emit_items(item_name, files, indent) . define my.item_name = emit_items.item_name . define my.files = emit_items.files -. define my.substitutions = emit_items.substitutions -. define my.filters = emit_items.filters . define my.indent = emit_items.indent -. define my.conflicts = emit_items.conflicts? . -. for my.files.file as _file where matches_filters(my.filters, _file.name) -. define my.conflicted = 0 -. define my.applicable_sub = matches_substitution(my.substitutions, _file.path) -. define my.sanitized_path = string.substr(_file.path, string.length(my.applicable_sub.absolute_path), string.length(_file.path) - 1) -. define my.filename = path_append(my.applicable_sub.relative_path_prefix, \ - path_append(my.sanitized_path, _file.name)) -. define my.filter_path = my.sanitized_path -. if defined(my.applicable_sub.filter) -. my.filter_path = path_append(my.applicable_sub.filter, my.sanitized_path) -. endif -. if ends_with(my.filter_path, "/") -. my.filter_path = string.substr(my.filter_path, 0, string.length(my.filter_path) - 2) -. endif -. -. define my.splitpoint = string.locate_last(_file.name, ".") -. define my.filename_base = string.substr(_file.name, 0, my.splitpoint - 1) +. for my.files.item as _file +. define my.lineend = defined(_file.has_conflict) ?? ">" ? " />" +$(my.indent)<$(my.item_name) Include="$(path(_file.name))"$(my.lineend) . -. if defined(my.conflicts) -. if (count(my.conflicts.conflict, count.name = my.filename_base) > 0) -. my.conflicted = 1 -. else -. new my.conflicts.conflict as _conflict -. _conflict.name = my.filename_base -. endnew -. endif -. endif -. -. if my.conflicted -. define my.path_to_prefix = string.replace(my.sanitized_path, "/|_") -. define my.disambiguated = "$(my.applicable_sub.unprefixed_path)$(my.path_to_prefix)$(my.filename_base).obj" -$(my.indent)<$(my.item_name) Include="$(path(my.filename))"> - $(my.indent)\$(IntDir)$(my.disambiguated) +. if defined(_file.has_conflict) + $(my.indent)\$(IntDir)$(_file.disambiguated) $(my.indent) -. else -$(my.indent)<$(my.item_name) Include="$(path(my.filename))" /> . endif . endfor . -. for my.files.directory as _directory -. emit_items(my.item_name, _directory, my.substitutions, my.filters, \ - my.indent, my.conflicts) -. endfor .endmacro # emit_items . .macro emit_import_projects(target, repository, configuration, toolchain, toolset, meta, indent) From cf270c4ce261229e547d6dd4dbf5e41ad495b3a3 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 15:24:14 -0700 Subject: [PATCH 4/8] Impose sort order on ItemGroup element Include value. --- templates/msbuild/vcxproj.gsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/msbuild/vcxproj.gsl b/templates/msbuild/vcxproj.gsl index d0553407..b86ae3bd 100644 --- a/templates/msbuild/vcxproj.gsl +++ b/templates/msbuild/vcxproj.gsl @@ -311,7 +311,7 @@ $(my.indent) . define my.files = emit_items.files . define my.indent = emit_items.indent . -. for my.files.item as _file +. for my.files.item as _file by _file.name . define my.lineend = defined(_file.has_conflict) ?? ">" ? " />" $(my.indent)<$(my.item_name) Include="$(path(_file.name))"$(my.lineend) . From c9eadfec8a6834233d42e7be209cad60498ef1a4 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 15:43:50 -0700 Subject: [PATCH 5/8] Impose sort order on dependency related entries. --- templates/msbuild/vcxproj.gsl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/msbuild/vcxproj.gsl b/templates/msbuild/vcxproj.gsl index b86ae3bd..ad29b8ad 100644 --- a/templates/msbuild/vcxproj.gsl +++ b/templates/msbuild/vcxproj.gsl @@ -338,7 +338,9 @@ $(my.indent) . . new dependencies as _dependencies . target_dependency_list(_dependencies, my.target, my.repository, my.configuration) -. for _dependencies.dependency as _depend where defined(_depend->nuget) +. for _dependencies.dependency as _depend by _depend.name \ + where defined(_depend->nuget) +. . for _depend->nuget.resource as _resource where \ !defined(_resource.component) . @@ -360,7 +362,7 @@ $(my.indent) . endfor . . # address component resources -. for _depend.component as _component +. for _depend.component as _component by _component.name . for _depend->nuget.resource as _resource where \ defined(_resource.component) & (_resource.component = _component.name) . @@ -403,7 +405,9 @@ $(my.indent)msvc->axis(.name = "platform").entry as _platform +. for my.toolchain->msvc->axis(.name = "platform").entry as _platform \ + where !defined(_platform.hidden) by _platform.value +. +. for my.toolchain->msvc->axis(.name = "configuration").entry as _config \ + where !defined(_config.hidden) +. \t$(my.indent)$(_config.value)|$(_platform.value) = $(_config.value)|$(_platform.value) . endfor . endfor @@ -145,9 +149,13 @@ $(my.indent)EndGlobalSection . define my.toolchain = emit_target_matrix.toolchain . define my.indent = emit_target_matrix.indent . -. for my.toolchain->msvc->axis(.name = "configuration").entry as _config -. define my.target_config = _config->$(name(my.target)).value -. for my.toolchain->msvc->axis(.name = "platform").entry as _platform +. for my.toolchain->msvc->axis(.name = "platform").entry as _platform \ + where !defined(_platform.hidden) by _platform.value +. +. for my.toolchain->msvc->axis(.name = "configuration").entry as _config \ + where !defined(_config.hidden) +. +. define my.target_config = _config->$(name(my.target)).value $(my.indent){$(my.target.uuid:upper)}.$(_config.value)|$(_platform.value).ActiveCfg = $(my.target_config)|$(_platform.value) $(my.indent){$(my.target.uuid:upper)}.$(_config.value)|$(_platform.value).Build.0 = $(my.target_config)|$(_platform.value) . endfor diff --git a/templates/msbuild/vcxproj.gsl b/templates/msbuild/vcxproj.gsl index ad29b8ad..d918d2e2 100644 --- a/templates/msbuild/vcxproj.gsl +++ b/templates/msbuild/vcxproj.gsl @@ -291,9 +291,9 @@ endfunction . $(my.indent) . -. for my.toolchain->msvc->axis(.name = "configuration").entry as _config -. define my.target_config = _config->$(name(my.target)).value -. for my.toolchain->msvc->axis(.name = "platform").entry as _platform +. for my.toolchain->msvc->axis(.name = "platform").entry as _platform by _platform.value +. for my.toolchain->msvc->axis(.name = "configuration").entry as _config +. define my.target_config = _config->$(name(my.target)).value . $(my.indent) $(my.indent)$(my.target_config) From d540f52c70fb175a5d4334c25e327265845437da Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Mon, 15 Jun 2026 22:36:08 -0700 Subject: [PATCH 7/8] Update UltrafastSecp256k1 version, vc143 nuget package, expanded configuration/platform matrix for vcxproj. --- version4.xml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/version4.xml b/version4.xml index 63151a3f..f051c819 100644 --- a/version4.xml +++ b/version4.xml @@ -49,7 +49,7 @@