pkgxdev / pkgx Goto Github PK
View Code? Open in Web Editor NEWthe last thing you’ll install
Home Page: https://pkgx.sh
License: Apache License 2.0
the last thing you’ll install
Home Page: https://pkgx.sh
License: Apache License 2.0
The README says tea can be used to run scripts, it it doesn't work.
➜ stable-diffusion git:(main) ls
LICENSE ldm
README.md main.py
Stable_Diffusion_v1_Model_Card.md models
assets notebook_helpers.py
configs scripts
data setup.py
environment.yaml
➜ stable-diffusion git:(main) tea setup.py
tea: command not found: setup.py
➜ stable-diffusion git:(main)
On macOS 13 arm64, zsh, node version v16.18.0 I get the following error when trying to run the example directly after installing (sh <(curl tea.xyz)
). It told me that I have to report the bug, so here you go 😆 Do you have any hint on how I can debug this? Thanks!
❯ tea +gnu.org/wget wget -qO- tea.xyz/white-paper | tea +charm.sh/glow glow -
tea: installed: ~/.tea/openssl.org/v1.1.118
tea: installed: ~/.tea/gnu.org/wget/v1.21.3
panic: split tea. we’re sorry and we’ll fix it… but you have to report the bug!
https://github.com/teaxyz/cli/issues/new?title=panic%3Ainvalid+absolute+path%3A+.
----------------------------------------------------->> attachment begin
Error: invalid absolute path: .
at new Path (file:///opt/tea.xyz/src/v0.11.13/src/vendor/Path.ts:38:19)
at find_tea (file:///opt/tea.xyz/src/v0.11.13/src/hooks/useShellEnv.ts:177:22)
at useShellEnv (file:///opt/tea.xyz/src/v0.11.13/src/hooks/useShellEnv.ts:89:29)
at exec (file:///opt/tea.xyz/src/v0.11.13/src/app.exec.ts:18:32)
at async file:///opt/tea.xyz/src/v0.11.13/src/app.ts:29:9
<<------------------------------------------------------ attachment ends
tea: installed: ~/.tea/charm.sh/glow/v1.4.1
panic: split tea. we’re sorry and we’ll fix it… but you have to report the bug!
https://github.com/teaxyz/cli/issues/new?title=panic%3Ainvalid+absolute+path%3A+.
----------------------------------------------------->> attachment begin
Error: invalid absolute path: .
at new Path (file:///opt/tea.xyz/src/v0.11.13/src/vendor/Path.ts:38:19)
at find_tea (file:///opt/tea.xyz/src/v0.11.13/src/hooks/useShellEnv.ts:177:22)
at useShellEnv (file:///opt/tea.xyz/src/v0.11.13/src/hooks/useShellEnv.ts:89:29)
at exec (file:///opt/tea.xyz/src/v0.11.13/src/app.exec.ts:18:32)
at async file:///opt/tea.xyz/src/v0.11.13/src/app.ts:29:9
<<------------------------------------------------------ attachment ends
Too easy to do and not easy to spot.
How do we specify a specific version of a package? I can't find this documented anywhere. I tried a few things and I think the character is "~" because when I use that it at least generates an error (my other guess, "@", doesn't generate an error).
> tea +python.org~v3.10 python
error: Uncaught Error: invalid semver range: ~v3.10
if (!match) throw new Error(`invalid semver range: ${input}`);
^
at file:///opt/tea.xyz/src/v0.13.0/src/utils/semver.ts:153:35
at Array.map (<anonymous>)
at new Range (file:///opt/tea.xyz/src/v0.13.0/src/utils/semver.ts:106:56)
at Module.parse (file:///opt/tea.xyz/src/v0.13.0/src/utils/pkg.ts:32:28)
at useArgs (file:///opt/tea.xyz/src/v0.13.0/src/hooks/useFlags.ts:51:30)
at file:///opt/tea.xyz/src/v0.13.0/src/app.ts:11:44
However, it doesn't work either.
> tea +python.org~3.10 python
Python 3.11.0 (main, Oct 29 2022, 23:30:44) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
> tea --version
tea 0.13.0
Build tea/cli for aarch platforms on tea/cli releases
Can I tea +pip.pypa.io pip install Y
to a different environment than tea +pip.pypa.io pip install X
? It looks like right now they're all installed in ~/.tea/python.org/v3.11.0/lib/python3.11/site-packages. It would be great if I can separate them.
Interestingly, even running it in zsh fails if env.SHELL = /bin/bash.
$ echo $SHELL
/bin/bash
$ tea +nodejs.org
this is a temporary shell containing the following packages:
[email protected], [email protected], [email protected], [email protected], [email protected]
when done type: `exit'
/bin/bash: --interactive: invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--pretty-print
--rcfile
--restricted
--verbose
--version
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCEHPT or -o option
Currently we stream downloads to final dst and this means the file is corrupt if the download fails. Generally we assume the file existing means it is cool so it breaks shit.
No, actually, we want *resumable downloads.
I tried to run tea .
in this repo I just cloned.
Running on MacOs M1 ship.
I'm just approaching the project, cannot really provide more info so far.
tea .
panic: split tea. we’re sorry and we’ll fix it… but you have to report the bug!
https://github.com/teaxyz/cli/issues/new?title=panic%3Anull
----------------------------------------------------->> attachment begin
null
<<------------------------------------------------------ attachment ends
eg. this should work:
$ tea +rust-lang.org^1.2 rustc <<-HEREDOC
println!("Hello World!");
HEREDOC
Implementation details:
We need an app developed/installed to the tea/cli to automatically open the terminal via the user’s web browser (tea www) when they click-to-copy the tea one-liner. The one-liner should be automatically pasted/entered into the terminal upon starting. Currently, the tea/cli asks users if they would like to install tea via a y/n question. If this could be bypassed, that would better ensure an install, but will defer to mxcl. Not giving devs an options may piss them off.
The imperative of this is two fold:
Prefer xz bottles on macOS
sh <(curl tea.xyz) https://github.com/teaxyz/cli
Is returning
error: http (spilt-tea-404)
400: https://raw.githubusercontent.com/teaxyz/cli
While in the README.md
we can see this written.
possibly: export PS1=${PS1%%}- tea-REPL %
$ tea https://github.com/teaxyz/demos/blob/main/demo.go input.txt
tea: demo.go downloading
error: Uncaught (in promise) Error: 404: https://raw.githubusercontent.com/teaxyz/demos/main/demo.go
throw new Error(`${rsp.status}: ${src}`);
^
at internal (file:///opt/tea.xyz/src/v0.11.4/src/hooks/useDownload.ts:75:23)
at async Object.download (file:///opt/tea.xyz/src/v0.11.4/src/hooks/useDownload.ts:81:12)
at async file:///opt/tea.xyz/src/v0.11.4/src/app.exec.ts:120:26
at async abracadabra (file:///opt/tea.xyz/src/v0.11.4/src/app.exec.ts:115:18)
at async exec (file:///opt/tea.xyz/src/v0.11.4/src/app.exec.ts:12:57)
at async file:///opt/tea.xyz/src/v0.11.4/src/app.ts:29:9
Just installed tea and facing this error while I try to install any package
tea +openssl.org
error: http (spilt-tea-404)
error sending request for url (https://dist.tea.xyz/openssl.org/darwin/aarch64/versions.txt): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
sh <(curl tea.xyz) +nodejs.org
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8739 100 8739 0 0 14750 0 --:--:-- --:--:-- --:--:-- 14938
error: http (spilt-tea-404)
error sending request for url (https://dist.tea.xyz/unicode.org/darwin/aarch64/versions.txt): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
seems like its not able to validate server certificate against a root certificate from the trust store.
How can I disable ssl check?
It seems that in the case I run a temporary tea invocation from the readme, and then the installer, the installer fails:
% sh <(curl tea.xyz) +rust-lang.org
######################################################################################################################################################################################### 100.0%
k, we installed /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/tea.xyz/v0.11.4/bin/tea
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/gnome.org/libxml2/v2.10.3
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/openssl.org/v1.1.118
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/gnu.org/gettext/v0.21.1
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/curl.se/v7.86.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/perl.org/v5.36.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/tea.xyz/gx/cc/v0.1.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/zlib.net/v1.2.13
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/git-scm.org/v2.38.1
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/rust-lang.org/v1.64.0
tea: installed: /var/folders/9x/pr1hvj4n16dgxh9sxy5gg2pm0000gp/T/tea-XXXXXX.TqvyDNYj/rust-lang.org/cargo/v0.65.0
this is a temporary shell containing the following packages:
gnome.org/[email protected], [email protected], gnu.org/[email protected], [email protected], [email protected], tea.xyz/gx/[email protected], [email protected], [email protected], [email protected], rust-lang.org/[email protected]
when done type: `exit'
% sh <(curl https://tea.xyz)
######################################################################################################################################################################################### 100.0%
/dev/fd/14: line 173: tea: command not found
/dev/fd/14: line 173: tea: command not found
To get the installer actually working I have to create a new terminal and run it again. This is on macOS ventura.
I guess I'm in a nested session here where I should exit, and then install, but ideally this would "just work"
I'm working on creating a package (isc.org/dhcp). I would like to create a REPL with the dependencies that my package requires so that I can debug the build commands. I don't know if there is a way to do this already, but I kind of instinctively thought the following might work, but it didn't (the error is shown).
# tea +isc.org/dhcp
error: http (spilt-tea-404)
404-not-found: https://dist.tea.xyz/isc.org/dhcp/linux/aarch64/versions.txt
Is there a way I can open a REPL with the dependencies that my local package requires? Maybe instead of tea +isc.org/dhcp
I could do something like tea +file://path_to/isc.org/dhcp
?
useGitHubAPI().getVersions()
doesn't like this. I can't say I blame it. Need some logic to work around that.
Currently, ... scripts/build.ts ninja-build.org@1
works fine, but this kind of nonsense will happen elsewhere.
Need to do that in cd.yml
.
Deno.run()
doesn't pass through stuff so eg. TEA_PREFIX
gets lost if set.
We need an exec
anyway maybe we should just implement it.
checksums
in the www
directoryWhile helping Montek with an error:
I discovered that this error which should be triggering when there's no commands in the README.md is unreachable:
https://github.com/davidtai/cli/blob/04a93c00750eb73bb35cd60a220ef42ffdcfe46a/src/app.exec.ts#L117
a check for } else if (args.length == 0) {
is nested inside a check for if (env && args.length) {
and therefore can never execute. Enabling this error makes Montek's scenario fail gracefully, however it breaks other common scenarios. More research is needed for a fix.
The results can be obtained with:
cd $(tea --prefix)/tea.xyz/var/pantry/projects
find * -name package.yml -type f -exec dirname {} \;
the filesystem lock is outside of our process. We need to catch signals and unlock and also be able to recover from not unlocking because our process was killed unceremoniously.
We had an issue in pantry.core with semver
not being able to resolve ^14
and ^14||^16||^18
into a satisfying version. It's likely an easy fix; don't want to forget to do it.
store and use etag in useDownload() so github.com downloads use cache
Error: Not a directory (os error 20), stat '/usr/local/bin/php/git'
at Object.statSync (deno:runtime/js/30_fs.js:322:9)
at Path.isFile (file:///opt/tea.xyz/src/v0.11.10/src/vendor/Path.ts:100:25)
at Path.isExecutableFile (file:///opt/tea.xyz/src/v0.11.10/src/vendor/Path.ts:119:19)
at find_git (file:///opt/tea.xyz/src/v0.11.10/src/hooks/useSync.ts:12:18)
at install (file:///opt/tea.xyz/src/v0.11.10/src/hooks/useSync.ts:64:27)
at update (file:///opt/tea.xyz/src/v0.11.10/src/hooks/useSync.ts:145:18)
at file:///opt/tea.xyz/src/v0.11.10/src/app.ts:25:15
macOS Ventura - 13.0
ZSH Shell
Use Mackup for dot file/app prefs backups, but .tea not currently symlinked
Python environments are run via pyenv
Initially I attempted to install v0.11.4 but that never prompted for the symlink for tea
to be added. I first installed v0.11.10 just by running the install command, but to make sure I wasn't using anything that could have conflicted, I deleted the .tea
folder and reset .zhsrc
and deleted the symlink and then reinstalled again.
It mentions that it is preinstalling the pantries, but running tea -S
is what causes this issue above, and if I try and run tea +gnu.org/wget wget -qO- tea.xyz/white-paper | tea +charm.sh/glow glow -
I get the following:
error: not-found in pantry: charm.sh/glow/package.yml (spilt-tea-101)
your time to shine? we’ll see you on GitHub…
https://github.com/teaxyz/pantry.extra#how-to-contribute
error: not-found in pantry: gnu.org/wget/package.yml (spilt-tea-101)
your time to shine? we’ll see you on GitHub…
https://github.com/teaxyz/pantry.extra#how-to-contribute
https://github.com/Kitware/CMake/releases
v3.24.0-rc1 makes us think that we can build v3.24.0, but then we 404 on download.
Longer term storing the key in as a GitHub Secrets is not sufficient and we will need to determine something better.
Longer term we will need releases to be approved via a push notification to the devices of @mxcl and @jhheider, this will pause the actions run waiting on that in some manner.
In https://github.com/teaxyz/www, when I run:
sh <(curl tea.xyz)
tea +git-scm.org git clone https://github.com/teaxyz/www tea-www
cd tea-www
tea .
I get an issue with temporary files:
dtai@Striker-Noir:~/projects/tea-www$ tea -vvv .
{
args: { args: [ "." ], pkgs: [] },
flags: {
verbosity: 3,
magic: true,
json: false,
numpty: false,
sync: false,
verbose: true,
debug: true,
muggle: false,
silent: false
}
}
/home/dtai/.tea/tea.xyz/v0.11.6/bin/tea
error: Uncaught (in promise) "file-exists:/home/dtai/.tea/tea.xyz/tmp/tea1ebdbfb5"
This occurs in WSL Ubuntu and OSX.
Need thoughts on this, though I think we can release without solving it and see what happens.
It's a code signing issue or something. Sigh.
➜ ~ cd white-paper
➜ white-paper git:(main) make
pandoc \
--number-sections \
--output tea.white-paper.pdf \
--metadata-file metadata.yml \
--filter pandoc-crossref \
--csl=tea.csl \
--citeproc \
white-paper.md
make: pandoc: No such file or directory
make: *** [tea.white-paper.pdf] Error 1
➜ white-paper git:(main) tea make
error: Uncaught (in promise) Error: 404-not-found: https://dist.tea.xyz/pandoc.org/darwin/aarch64/versions.txt
if (!rsp.ok) throw new Error(`404-not-found: ${url}`) //FIXME
^
at Object.select (file:///opt/tea.xyz/src/v0.11.6/src/hooks/useInventory.ts:7:24)
at async resolve (file:///opt/tea.xyz/src/v0.11.6/src/prefab/resolve.ts:18:29)
at async install (file:///opt/tea.xyz/src/v0.11.6/src/app.exec.ts:63:17)
at async exec (file:///opt/tea.xyz/src/v0.11.6/src/app.exec.ts:13:27)
at async file:///opt/tea.xyz/src/v0.11.6/src/app.ts:29:9
➜ white-paper git:(main) tea .
error: Uncaught (in promise) Error: 404-not-found: https://dist.tea.xyz/pandoc.org/darwin/aarch64/versions.txt
if (!rsp.ok) throw new Error(`404-not-found: ${url}`) //FIXME
^
at Object.select (file:///opt/tea.xyz/src/v0.11.6/src/hooks/useInventory.ts:7:24)
at async resolve (file:///opt/tea.xyz/src/v0.11.6/src/prefab/resolve.ts:18:29)
at async install (file:///opt/tea.xyz/src/v0.11.6/src/app.exec.ts:63:17)
at async exec (file:///opt/tea.xyz/src/v0.11.6/src/app.exec.ts:13:27)
at async file:///opt/tea.xyz/src/v0.11.6/src/app.ts:29:9
➜ white-paper git:(main)
Code useCache.ts, useOffLicense.ts, and prefab/install.ts to use IPFS with an S3 backup
Moving from one env to another doesn’t set that env correctly
error for:
console.log
if
statementEg. go.dev has a VERSION file that contains eg. go1.18.3
npm
ships with node
but is versioned independently.
npm i -g npm@latest
to update it, (instead prompting them to use tea update npm
(where update
will be a teaxyz/cmd cmd-fork).npmjs.org
with separate versioningnodejs.org
tea -Eds
pending packages works
For example:
$ tea +node-js.org
Should error with the suggestion of +nodejs.org
.
We have this in the README
it's a neat idea.
Needs a lambda on our cloudfront to do it, and it should only do it for cURL
so we can provide the web listing for the whole of dist.tea.xyz
like I keep asking @jhheider to do.
@jhheider you used OrderedSortedSet
rather than OrderedSet
. Docs suggest the sorted set changes the order:
Changing the order is incorrect behavior, the pkg order is specified by the user and should be kept.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.