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

fetch: Fix various issues related to zig fetch --save #21931

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Nov 17, 2024

  1. fetch: Disallow --save when fetching by file path

    The purpose of `zig fetch` is to copy a package to the global cache to
    avoid needing to access the network. `path` entries in a build.zig.zon
    are for relative paths inside a package. It does not make sense to
    `--save` a package fetched by a (CWD-relative) file path.
    
    Closes ziglang#18639
    castholm committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    6eb9ee1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5165de9 View commit details
    Browse the repository at this point in the history
  3. fetch: Fix fetching by file URL

    This did not work at all previously because the `parent_package_root`
    field was `undefined`.
    
    This fix additionally validates that the file URL is a conformant local
    URL and decodes absolute Windows paths correctly.
    
    See RFC 8089 and https://url.spec.whatwg.org/ for relevant specs.
    castholm committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    8fb99c5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ef0095 View commit details
    Browse the repository at this point in the history
  5. Add compiler internals tests

    There are several test decls inside `/src` that are not currently being
    tested and have bitrotted as a result. This commit revives those tests
    and adds the `test-compiler-internals` set of tests which tests
    everything reachable from `/src/main.zig`.
    castholm committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    eeac776 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b335509 View commit details
    Browse the repository at this point in the history