Open sanchitram1 opened 6 months ago
Hey @sanchitram1, nice to see you around again! Hope you're doing well.
From the error message you've shared, it seems like there are two main issues:
warn: parse failure: google.github.io/snappy
- This warning message is repeated multiple times, indicating that there's an issue with parsing the dependency google.github.io/snappy
. However, this dependency is not listed in your .pkgx.yaml
file. It's possible that this dependency is a sub-dependency of one of the dependencies you've listed, or it might be a leftover from a previous configuration.
Assertion failed: pkgx: env is being duped
- This error message suggests that there's a duplicate environment variable being set. The pkgx tool is designed to manage dependencies and environment variables, and it seems to have detected a conflict.
To help resolve these issues, here are a few steps you can take:
Check your other .pkgx.yaml
files: The error messages might be related to another .pkgx.yaml
file in a different directory. Check these files for any mention of google.github.io/snappy
or duplicate environment variables.
Update your pkgx version: You might be using an outdated version of pkgx that has issues with parsing certain dependencies or handling environment variables. Make sure you're using the latest version, which is v1.1.6.
Check your environment variables: The env is being duped
error suggests that there's a conflict with environment variables. Check your system's environment variables and any environment variables set in your .pkgx.yaml
files for duplicates.
If none of these steps resolve the issue, it would be helpful if you could provide more information about your setup. Specifically, the contents of any other .pkgx.yaml
files you're using, the version of pkgx you're running, and any relevant environment variables would be useful.
For more information on how pkgx handles .pkgx.yaml
files, you can refer to the src/utils/devenv.ts file in the pkgx repository. This file contains the code that parses .pkgx.yaml
files and manages dependencies and environment variables.
I hope this helps! If you have any other questions or need further clarification, feel free to ask.
this is almost always a corrupt file in the pantry, due to a bad download. you should be able to cat ~/Library/Application\ Support/pkgx/pantry/projects/google.github.io/snappy/package.yml
to see the problem, but pkgx --sync
should clear it up.
I suddenly have this problem too, and it doesn't go away with pkgx --sync
:
$ cd test
Assertion failed: pkgx: env is being duped
env +postgresql.org=15.2.0 +git-scm.org
$ cat .pkgx.yml
dependencies:
postgresql.org: =15.2.0
$ pkgx --sync
Assertion failed: pkgx: env is being duped
TERMINFO_DIRS=/usr/share/terminfo:/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/share/terminfo
SSL_CERT_FILE=/Users/x/.pkgx/curl.se/ca-certs/v2023.8.22/ssl/cert.pem
PYTHONPATH="/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/lib/python3.11/site-packages${PYTHONPATH:+:$PYTHONPATH}"
GIT_TEMPLATE_DIR=/Users/x/.pkgx/git-scm.org/v2.42.0/share/git-core/templates
GIT_SSL_CAINFO=/Users/x/.pkgx/curl.se/ca-certs/v2023.8.22/ssl/cert.pem
PATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/bin:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/bin:/Users/x/.pkgx/openssl.org/v1.1.1w/bin:/Users/x/.pkgx/gnu.org/readline/v8.2.0/bin:/Users/x/.pkgx/lz4.org/v1.9.4/bin:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/bin:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/bin:/Users/x/.pkgx/unicode.org/v73.2.0/bin:/Users/x/.pkgx/unicode.org/v73.2.0/sbin:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/bin:/Users/x/.pkgx/curl.se/v8.3.0/bin:/Users/x/.pkgx/perl.org/v5.38.0/bin:/Users/x/.pkgx/libexpat.github.io/v2.5.0/bin:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/bin:/Users/x/.pkgx/postgresql.org/v15.2.0/bin:/Users/x/.pkgx/git-scm.org/v2.42.0/bin:/Users/x/.pkgx/unicode.org/v71.1.0/bin:/Users/x/.pkgx/unicode.org/v71.1.0/sbin${PATH:+:$PATH}"
CPATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/include:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/include:/Users/x/.pkgx/openssl.org/v1.1.1w/include:/Users/x/.pkgx/gnu.org/readline/v8.2.0/include:/Users/x/.pkgx/zlib.net/v1.3.0/include:/Users/x/.pkgx/lz4.org/v1.9.4/include:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/include:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/include:/Users/x/.pkgx/unicode.org/v73.2.0/include:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/include:/Users/x/.pkgx/curl.se/v8.3.0/include:/Users/x/.pkgx/libexpat.github.io/v2.5.0/include:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/include:/Users/x/.pkgx/postgresql.org/v15.2.0/include:/Users/x/.pkgx/unicode.org/v71.1.0/include${CPATH:+:$CPATH}"
LIBRARY_PATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/lib:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/lib:/Users/x/.pkgx/openssl.org/v1.1.1w/lib:/Users/x/.pkgx/gnu.org/readline/v8.2.0/lib:/Users/x/.pkgx/zlib.net/v1.3.0/lib:/Users/x/.pkgx/lz4.org/v1.9.4/lib:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/lib:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/lib:/Users/x/.pkgx/unicode.org/v73.2.0/lib:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/lib:/Users/x/.pkgx/curl.se/v8.3.0/lib:/Users/x/.pkgx/perl.org/v5.38.0/lib:/Users/x/.pkgx/libexpat.github.io/v2.5.0/lib:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/lib:/Users/x/.pkgx/postgresql.org/v15.2.0/lib:/Users/x/.pkgx/unicode.org/v71.1.0/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
PKG_CONFIG_PATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/lib/pkgconfig:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/lib/pkgconfig:/Users/x/.pkgx/openssl.org/v1.1.1w/lib/pkgconfig:/Users/x/.pkgx/gnu.org/readline/v8.2.0/lib/pkgconfig:/Users/x/.pkgx/zlib.net/v1.3.0/lib/pkgconfig:/Users/x/.pkgx/lz4.org/v1.9.4/lib/pkgconfig:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/lib/pkgconfig:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/lib/pkgconfig:/Users/x/.pkgx/unicode.org/v73.2.0/lib/pkgconfig:/Users/x/.pkgx/curl.se/v8.3.0/lib/pkgconfig:/Users/x/.pkgx/libexpat.github.io/v2.5.0/lib/pkgconfig:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/lib/pkgconfig:/Users/x/.pkgx/postgresql.org/v15.2.0/lib/pkgconfig:/Users/x/.pkgx/unicode.org/v71.1.0/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
XDG_DATA_DIRS="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/share:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/share:/Users/x/.pkgx/gnu.org/readline/v8.2.0/share:/Users/x/.pkgx/zlib.net/v1.3.0/share:/Users/x/.pkgx/lz4.org/v1.9.4/share:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/share:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/share:/Users/x/.pkgx/unicode.org/v73.2.0/share:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/share:/Users/x/.pkgx/curl.se/v8.3.0/share:/Users/x/.pkgx/libexpat.github.io/v2.5.0/share:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/share:/Users/x/.pkgx/postgresql.org/v15.2.0/share:/Users/x/.pkgx/git-scm.org/v2.42.0/share:/Users/x/.pkgx/unicode.org/v71.1.0/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
MANPATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/share/man:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/share/man:/Users/x/.pkgx/gnu.org/readline/v8.2.0/share/man:/Users/x/.pkgx/zlib.net/v1.3.0/share/man:/Users/x/.pkgx/lz4.org/v1.9.4/share/man:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/share/man:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/share/man:/Users/x/.pkgx/unicode.org/v73.2.0/share/man:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/share/man:/Users/x/.pkgx/curl.se/v8.3.0/share/man:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/share/man:/Users/x/.pkgx/unicode.org/v71.1.0/share/man:${MANPATH}:/usr/share/man"
LD_LIBRARY_PATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/lib:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/lib:/Users/x/.pkgx/openssl.org/v1.1.1w/lib:/Users/x/.pkgx/gnu.org/readline/v8.2.0/lib:/Users/x/.pkgx/zlib.net/v1.3.0/lib:/Users/x/.pkgx/lz4.org/v1.9.4/lib:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/lib:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/lib:/Users/x/.pkgx/unicode.org/v73.2.0/lib:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/lib:/Users/x/.pkgx/curl.se/v8.3.0/lib:/Users/x/.pkgx/perl.org/v5.38.0/lib:/Users/x/.pkgx/libexpat.github.io/v2.5.0/lib:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/lib:/Users/x/.pkgx/postgresql.org/v15.2.0/lib:/Users/x/.pkgx/unicode.org/v71.1.0/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
DYLD_FALLBACK_LIBRARY_PATH="/Users/x/.pkgx/invisible-island.net/ncurses/v6.4.0/lib:/Users/x/.pkgx/tukaani.org/xz/v5.4.5/lib:/Users/x/.pkgx/openssl.org/v1.1.1w/lib:/Users/x/.pkgx/gnu.org/readline/v8.2.0/lib:/Users/x/.pkgx/zlib.net/v1.3.0/lib:/Users/x/.pkgx/lz4.org/v1.9.4/lib:/Users/x/.pkgx/gnome.org/libxml2/v2.11.4/lib:/Users/x/.pkgx/gnome.org/libxslt/v1.1.39/lib:/Users/x/.pkgx/unicode.org/v73.2.0/lib:/Users/x/.pkgx/gnu.org/gettext/v0.21.1/lib:/Users/x/.pkgx/curl.se/v8.3.0/lib:/Users/x/.pkgx/perl.org/v5.38.0/lib:/Users/x/.pkgx/libexpat.github.io/v2.5.0/lib:/Users/x/.pkgx/rockdaboot.github.io/libpsl/v0.21.5/lib:/Users/x/.pkgx/postgresql.org/v15.2.0/lib:/Users/x/.pkgx/unicode.org/v71.1.0/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}"
$ cd ..
env -postgresql.org=15.2.0 -git-scm.org
$ cd test
Assertion failed: pkgx: env is being duped
env +postgresql.org=15.2.0 +git-scm.org
$ pkgx --version
pkgx 1.1.6
The Assertion failed
message only seems to appear with postgresql.org dependency, if I have other dependencies all is well.
Eeeeenteresting. I can guess exactly why:
The error comes from here: https://github.com/pkgxdev/pkgx/blob/104affb636a128b9e9c6b7fb2f07f2f0ea17f128/src/prefab/construct-env.ts#L38-L40
And as of this PR: https://github.com/pkgxdev/libpkgx/pull/61, on January 27th, libpkgx
allows multiple versions of unicode
in the environment, specifically to deal with postgresql
requiring v73 and most of our other packages built for v71. So, it is both the case that the assertion is correct, and the behavior is also correct.
Due to that PR, the assertion is outdated, since we can, now, have more distinct packages than unique packages. So, good find.
.pkgx.yaml
content in /analytics:Error:
Not sure what either error is - what else can I provide to help give more context?