git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] BreakingChanges: early adopter option

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 22, 2024, 17:51 UTC
Message-ID
<xmqqtte77f0n.fsf@gitster.g>
In-Reply-To
<xmqqploydn7j.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Discussing the desire to make breaking changes, declaring that
>> breaking changes are made at a certain version boundary, and
>> recording these decisions in this document, are necessary but not
>> sufficient.  We need to make sure that we can implement, test, and
>> deploy such impactful changes.
>>
>> Formalize the mechanism based on the `feature.*` configuration
>> variable to allow early adopters to opt into the breaking change in
>> a version of Git before the planned version for the breaking change.
>> ...
> ... to see what it involves
> to allow early adopters to experience Git 3.0 features/removals
> before it actually happens.

Sorry for a long monologue on this important topic, while everybody is away. Hopefully we'll see more comments when they get back once the week starts ;-)

Show 15 quoted lines
> Switching behaviour at runtime with feature.git3 should work well,
> and we can also add tests that checks the new behaviour by doing
> "test_config feature.git3 true".
> ...
> If we are willing to burden early adopters a bit more, we could make
> it a build-time option.  With "make GIT_BUILD_FOR_GIT3=YesPlease",
> binaries will be built for all the then-current Git 3.0 features and
> documentation under development.  It certainly is a simpler-to-build
> option that is easier for us, but I am not sure if that is acceptable
> by those who volunteer to test the upcoming big version.
>
> One thing to note is that depending on the nature of a change, once
> you start using a feature only available in a newer version of Git
> in your repository, the resulting repository may not be understood
> by an older version of Git...

While I still am with the position that we can do this either at runtime or at build time, with the trade-off being that it is more costly for developers to do it at runtime and more cumbersome for early adopters to do it at build time, I realize that the last point above is unrelated. If one or some of the features behind either feature.git3 runtime option or GIT_BUILD_FOR_GIT3 build-time option makes a repository inaccessible to versions of Git without these features, we have the extension.* mechanism to make sure nothing breaks, and testing that such a Git3 feature is properly protected by the extension.* mechanism is part of the early adopter testing.

How much more costly to do at runtime is still subject to further analysis, I think. I know that it means we need to build and install the docs twice to support "git -c feature.git3=on help", for example, but I am not sure what the best way to use CI would be (write tests that check features with different behaviour by explicitly running them with "git -c feature.git3=on"? Run the same set of tests in a separate job that has "[feature] git3" in its $HOME/.gitconfig?).

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 3 of 14 in “BreakingChanges: early adopter option”
  1. BreakingChanges: early adopter optionJunio C Hamano, Sep 19, 2024
  2. Junio C HamanoSep 20, 2024
  3. Junio C HamanoSep 22, 2024
  4. Patrick SteinhardtSep 26, 2024
  5. Phillip WoodSep 26, 2024
  6. Junio C HamanoSep 26, 2024
  7. Junio C HamanoSep 26, 2024
  8. Junio C HamanoSep 26, 2024
  9. BreakingChanges: early adopter optionJunio C Hamano, Oct 11, 2024
  10. Patrick SteinhardtOct 16, 2024
  11. Taylor BlauOct 16, 2024
  12. Re* [PATCH v2] BreakingChanges: early adopter optionJunio C Hamano, Feb 28, 2025
  13. Patrick SteinhardtMar 3, 2025
  14. Junio C HamanoMar 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.