Skip to content

Rethink how ZLS maintains backwards compatibility #1020

Closed
@Techatrix

Description

@Techatrix

The conclusion

ZLS has the following compatibility requirements:

  • A tagged release of Zig or ZLS must be used with the same tagged release of Zig or ZLS
  • A master/nightly build of ZLS requires master/nightly build of Zig

A master/nightly build of ZLS may be backwards compatible with older Zig versions (like the latest tagged release) but this is done as a best effort and may break at any time. If you rely on this behavior, your are destined to have incompatible Zig and ZLS versions at some point.


This has partially be brought up in #1000 and #1019

With the numerous breaking changes to the Zig language and its build system, it became harder to maintain compatibility with older Zig versions. This issue is only going to get worse as more versions are released and Zig's development accelerates.

I think its time to discuss ZLS's plan on how its going maintain compatibility with Zig.
Its harder to make a decision without knowing how many people are going to be affected by certain changes.
How many people use a pre 0.10.x release of Zig with ZLS master?
How many people use ZLS master compared a tagged release?
What version(s) do Zig projects tend to require?
How quickly do projects transition to new versions of Zig?

Despite that, here are some possibilities i could think of:

Strict

ZLS master only maintains compatibility with Zig master.
A tagged release of ZLS is only compatible with the same tagged release of Zig.

Relaxed

ZLS master can only be compiled with Zig master and is compatible with Zig master and the the latest tagged release of Zig.
A tagged release of ZLS must be compiled with and is only compatible with the same tagged release of Zig.

Split branches

We take the Strict Proposal but also maintain separate branch of ZLS that backports changes while maintaining compatibility with the latest tagged release of Zig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions