Repository navigation
Define libhxcpp and hxcpp as the checkout's version, not 6.0.0 - #515
Draft
dimensionscape wants to merge 1 commit into
Draft
dimensionscape wants to merge 1 commit into
dimensionscape wants to merge 1 commit into
Conversation
extraParams.hxml named 6.0.0 in every commit, and the release workflow
corrected it only in the package it built. haxelib dev and haxelib git
install a commit as it is, so a build against a checkout of 6.1.0 was
given libhxcpp=6.0.0 and hxcpp=6.0.0, as was one against the commit a
release tag names, and (libhxcpp >= version("6.0.2")) was false there.
The build tool reads the same line to warn when Haxe generated the code
for another version, so a C++ build against such a checkout warned that
it was generated for hxcpp 6.0.0.
extraParams.hxml now names the version haxelib.json gives, 6.1.0. The
release check stops when the two differ, and the release no longer
rewrites the line in its package, so the commit a tag names is right as
well. test/release_stamp holds the checkout's two files together, and
test/haxelib installs the checkout with haxelib dev and reads the
defines a build gets.
The line keeps its form, with the version in it: the build tool's
warning of two copies mixed (#79) takes the version from that line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A checkout of libhxcpp defines
libhxcppandhxcppas 6.0.0 whatever its version. Onmain, whichhaxelib.jsonputs at 6.1.0, this is not compiled:#if (libhxcpp >= version("6.0.2")) // built against libhxcpp 6.0.2 or newer #endhaxelib devandhaxelib gitboth give it. Installed with either,maindefines 6.0.0 for both names, andhaxelib gitatv6.0.4does too. Every tag fromv6.0.0-rc.1tov6.0.4has the same two lines.A C++ build against such a checkout also warns:
Cause
extraParams.hxmlnames the version in its two define lines, and has named 6.0.0 in every commit. The release workflow corrects the lines withRelease stampin the files it packages, and the commit keeps 6.0.0. haxelib's own-Dline gives the name asked for the right version, and the macro lines then replace it.The build tool takes the version out of the first of those lines, as Haxe records it in
Options.txt, for the warning added for #79. That is where the false warning comes from.The change
extraParams.hxmlnames 6.1.0, the versionhaxelib.jsongives.Release check, and sostamp, stops unlessextraParams.hxmldefines each name as the version, in one line each, and prints the line it needs.stampno longer rewrites the file: the package gets the commit's lines, so a tag and its package agree.RELEASING.md: the release commit, and the commit that opens the next version, set the version in both files.The cost is a second file to edit at each version change. A macro that reads
haxelib.jsonwould spare that, at the price of the build tool's warning: the line Haxe records would hold no version, and the version in that line is what the warning compares.Tests
test/release_stamp/check.shnow checks the checkout itself, its two define lines against itshaxelib.json. It also runsRelease checkon a release commit whoseextraParams.hxmlhas one name on another version, the other name on another version, a version that only starts the same (6.0.10 for 6.0.1), a missing line, and a second line for one name. Each is refused with the line it needs. With the test changed and the code as onmain, 12 of its 17 checks fail.test/haxelib/check.shinstalls the checkout withhaxelib devand reads the defines a build gets. Onmainthat check fails withhxcpp=6.0.0 libhxcpp=6.0.0.Both ran on 64-bit Windows in Git Bash with Haxe 4.3.7, and pass. CI runs them on pushes to
mainand not on pull requests.Also checked by hand:
haxelib gitfrom a local clone:mainandv6.0.4give 6.0.0 for both names, and this branch gives 6.1.0.-lib hxcppand-lib libhxcppeach give both defines as 6.1.0.>= version("6.0.2")and>= version("6.1.0")are true, and>= version("6.1.1")is false.release.hxmlLime writes for it compiles with 6.0.0 for both names onmainand 6.1.0 here.EnvironmentWideandCppiaHostArgsbuilt against the branch print no warning. With thehxcppline ofOptions.txtchanged by hand to 6.0.4, the build tool warns that the code was generated for hxcpp 6.0.4, so the warning still fires for a real difference.Not run here: Linux and macOS.