No description
Find a file
Jacob Heider 68fe23f812
fix(cargo)
this settings causes the built cargos to produce
```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600003ad0140'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000018a64c540 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018a13deb4 objc_exception_throw + 60
        2   CoreFoundation                      0x000000018a6fe124 -[NSObject(NSObject) __retain_OA] + 0
        3   CoreFoundation                      0x000000018a5b6764 ___forwarding___ + 1572
        4   CoreFoundation                      0x000000018a5b6080 _CF_forwarding_prep_0 + 96
        5   Foundation                          0x000000018b68e7c0 -[NSProcessInfo arguments] + 188
        6   CoreFoundation                      0x000000018a6c7d40 __getDefaultArguments_block_invoke + 96
        7   libdispatch.dylib                   0x000000018a348910 _dispatch_client_callout + 20
        8   libdispatch.dylib                   0x000000018a34a14c _dispatch_once_callout + 32
        9   CoreFoundation                      0x000000018a6c76dc _addBackstopValuesForIdentifierAndSource + 640
        10  CoreFoundation                      0x000000018a581f8c __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
        11  CoreFoundation                      0x000000018a6c7384 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
        12  CoreFoundation                      0x000000018a5882fc -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
        13  CoreFoundation                      0x000000018a706604 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296
        14  CoreFoundation                      0x000000018a7062ac -[_CFXPreferences withSearchLists:] + 84
        15  CoreFoundation                      0x000000018a583850 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300
        16  CoreFoundation                      0x000000018a706458 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
        17  CoreFoundation                      0x000000018a583178 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156
        18  CoreFoundation                      0x000000018a5830a0 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
        19  SystemConfiguration                 0x000000018b316478 SCDynamicStoreCopyProxiesWithOptions + 180
        20  libcurl.4.dylib                     0x00000001069e8344 Curl_macos_init + 16
        21  libcurl.4.dylib                     0x00000001069cfbc8 curl_global_init + 220
        22  cargo                               0x0000000105518eac _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h20fa8299105ad21aE + 36
        23  cargo                               0x0000000105632f64 _ZN3std10sys_common4once5queue4Once4call17h21bf9d6ad03f4977E + 1280
        24  cargo                               0x0000000105519168 _ZN4curl9INIT_CTOR9init_ctor17hf43b2c91f874bbd6E + 88
        25  dyld                                0x000000018a195a24 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 168
        26  dyld                                0x000000018a1db0f4 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.202 + 172
        27  dyld                                0x000000018a1ce668 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496
        28  dyld                                0x000000018a1752fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300
        29  dyld                                0x000000018a1cd6a0 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192
        30  dyld                                0x000000018a1d0188 _ZNK5dyld39MachOFile32forEachInitializerPointerSectionER11DiagnosticsU13block_pointerFvjjRbE + 160
        31  dyld                                0x000000018a1dade8 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 432
        32  dyld                                0x000000018a191b38 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 524
        33  dyld                                0x000000018a197f70 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
        34  dyld                                0x000000018a191f24 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220
        35  dyld                                0x000000018a195ab0 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 112
        36  dyld                                0x000000018a1920f0 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 380
        37  dyld                                0x000000018a1b74dc _ZN5dyld44APIs25runAllInitializersForMainEv + 464
        38  dyld                                0x000000018a179fa0 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
        39  dyld                                0x000000018a178edc start + 1844
)
libc++abi: terminating due to uncaught exception of type NSException
/Users/jacob/pkgx/pantry/testbeds/rust-lang.org__cargo-0.76.0.sh: line 32: 76812 Abort trap: 6           cargo init . --name xyz_tea_fixture
```

on sonoma
2024-02-11 17:24:56 -05:00
.devcontainer fix: update codespaces configuration (#3550) 2023-10-06 19:31:46 -04:00
.github Fix pantry.tgz upload 2024-02-10 11:51:15 -05:00
.vscode git foo will automatically install and run git-foo (#3537) 2023-10-05 13:52:36 -04:00
projects fix(cargo) 2024-02-11 17:24:56 -05:00
.gitignore unicode * is toxic (#4049) 2023-11-15 15:04:53 -05:00
pkgx.yaml use brewkit@v1 (#4314) 2023-12-13 05:42:25 -05:00
README.md chore(docs): Add details for not using dev 2024-02-10 08:32:41 -05:00

pkgx

pkg metadata and build instructions.

Contributing

Assuming you have pkgx with shell integration:

$ git clone https://github.com/pkgxdev/pantry

$ cd pantry

$ dev  # https://docs.pkgx.sh/dev
# ^^ adds brewkit (ie. the `bk` command) to your devenv
# ^^ IMPORTANT! Otherwise the `bk` command will not be found
# ^^ Alternatively, you can use pkgx and prefix your commands with the ENV
# ^^ PKGX_PANTRY_PATH=$(pwd) pkgx bk [command]

$ bk init
# ^^ creates a “wip” package.yml
# ^^ if you already know the name, you can pass it as an argument

$ bk edit
# ^^ opens the new package.yml in your EDITOR

$ bk build
# builds to `./builds`
# ^^ needs a zero permissions GITHUB_TOKEN to use the GitHub API
# either set `GITHUB_TOKEN` or run `gh auth login`

$ pkgx yq .provides <projects/$(bk status | tr -d '[:space:]')/package.yml
- bin/foo
# ^^ purely demonstrative for the next step

$ pkgx foo
# ^^ anything in the `provides:` key will now run

$ bk audit
# ^^ worth doing an audit to check for common pkging issues

$ bk test
# ^^ you need to write a test that verifies the package works

$ gh repo fork
$ git branch -m my-new-package
$ git push origin my-new-package
$ gh pr create

Tip

  • bk build and bk test can be invoked eg. bk docker build to run inside a Docker container for Linux builds and testing
  • All commands take an optional pkg-spec eg. bk build node@19
  • While inside the pantry dev environment you can run commands from any built packages provided you specified their provides: key in the package.yml.

Note

We use a special package called brewkit to build packages both here and in CI/CD. brewkit provides the bk command.

Important

brewkit installs the built products to ${PKGX_DIR:-$HOME/.pkgx} which means they are installed to your users pkgx cache.

GitHub Codespaces

pantry also works in GitHub Codespaces. The default configuration provided with the repository will install/update pkgx at the time you attach, so you should be able to quickly work on test packages in a remote linux environment (or work from a device with just a web browser).

Packaging Guide

Packaging can be cumbersome. Our wiki is our packaging knowledge base. For other assistance, start a discussion.

The best way to figure out solutions for your problems is to read other examples from the pantry.

After Your Contribution

We build “bottles” (tard binaries) and upload them to our CDN. Thus your contribution will be available at merge-time + build-time + CDN distribution time.

pkgx should automatically sync the pantry to your local machine if you ask for something it doesnt know about, but in the case where that fails do a pkgx --sync first.

Note

The pantry automatically builds new releases of packages as soon as they are released (usually starting the builds within seconds). There is no need to submit PRs for updates.

Note that while in the pantry dev environment you can use your new package if you built it. However this will not work outside the pantry dev unless you either:

  1. You set PKGX_PANTRY_PATH
  2. Get your PR merged!

Working on Other Peoples Pull Requests

Packaging can be fiddly so we all pitch in. If you want to help someone else with their pull request then you can use GitHubs CLI:

$ gh pr checkout 123

# or you can copy paste the URL:
$ gh pr checkout https://github.com/pkgxdev/pantry/pull/123

# then open for editing:
$ bk edit