Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce std.Build.path; deprecate LazyPath.relative #19597

Merged
merged 1 commit into from
Apr 10, 2024
Merged

Conversation

andrewrk
Copy link
Member

This adds the *std.Build owner to LazyPath so that lazy paths returned from a dependency can be used in the application without friction or footguns.

This is technically a breaking change due to test_runner taking a LazyPath rather than a string but it does not do the massive breaking change yet. The breakage can happen during the 0.13.0 release cycle.

closes #19313

Upgrade Guide

Source-Relative LazyPath (deprecated only)

.root_source_file = .{ .path = "src/main.zig" },

⬇️

.root_source_file = b.path("src/main.zig"),

LazyPath.relative (deprecated only)

.root_source_file = LazyPath.relative("src/main.zig"),

⬇️

.root_source_file = b.path("src/main.zig"),

Test Runner (breaking)

.test_runner = "path/to/test_runner.zig",

⬇️

.test_runner = b.path("path/to/test_runner.zig"),

This adds the *std.Build owner to LazyPath so that lazy paths returned
from a dependency can be used in the application without friction or
footguns.

closes #19313
@andrewrk andrewrk added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. zig build system std.Build, the build runner, `zig build` subcommand, package management release notes This PR should be mentioned in the release notes. labels Apr 10, 2024
@andrewrk andrewrk merged commit 7fb5a0b into master Apr 10, 2024
10 checks passed
@andrewrk andrewrk deleted the lazy-path-owner branch April 10, 2024 22:02
linusg added a commit to linusg/bdwgc that referenced this pull request Apr 14, 2024
linusg added a commit to linusg/bdwgc that referenced this pull request Apr 14, 2024
@andrewrk andrewrk added this to the 0.12.0 milestone Apr 18, 2024
MFAshby added a commit to MFAshby/zig-lsp-kit that referenced this pull request May 23, 2024
MFAshby added a commit to MFAshby/ziggy that referenced this pull request May 23, 2024
MFAshby added a commit to MFAshby/tree-sitter that referenced this pull request May 23, 2024
MFAshby added a commit to MFAshby/tree-sitter that referenced this pull request May 23, 2024
MFAshby added a commit to MFAshby/cmark-gfm that referenced this pull request May 24, 2024
MFAshby added a commit to MFAshby/flow-syntax that referenced this pull request May 24, 2024
MFAshby added a commit to MFAshby/zeit that referenced this pull request May 24, 2024
rockorager pushed a commit to rockorager/zeit that referenced this pull request May 24, 2024
neurocyte pushed a commit to neurocyte/tree-sitter that referenced this pull request May 24, 2024
neurocyte pushed a commit to neurocyte/flow-syntax that referenced this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store Build relative information in LazyPath
1 participant