owned this note
owned this note
Published
Linked with GitHub
# Nushell core team meeting 2023-08-30
## Attendees
- amtoine
- terts
- JT
- fdncred
- storm
- reilly
- wind
- stefan
- labestiapty
- jakub
## Agenda
- [x] uutils/coreutils discussion with terts and dmatos
- cp parameters, what is the final list for dmatos to integrate? [voting spreadsheet](https://docs.google.com/spreadsheets/d/1aFXAg2IkHFCz289QYBroSn9XK_80lV3y7KEZxzeHw2c/edit#gid=0)
- should uu_cp be featured gated in our next release or should uu_cp just be our default cp from here on out?
- joint blog for nushell and coreutils announcing this integration
- what is the next command to integrate? (maybe it's too soon to talk about this) (crawl, walk, run list here https://docs.google.com/spreadsheets/d/1MP9V8BTtcy_3DIUT8025yTcGrjkIJ-ZKFT0uvJFw0Lo/edit#gid=0)
- flags behind a feature flag?
- [x] Preliminary survey thoughts
- [ ] Feedback from "The Case for Nushell"
- [ ] String interpolation shorthand: https://github.com/nushell/nushell/pull/10147
- [ ] Should we allow omitting `()` for variables in string interpolation? (`spam --foo=$name`, `$"foo $bar"`)
- [ ] Syntax highlighting needs improvement (compare `cat $"($nu.config-path)/../env.nu"` vs. `cat ($nu.config-path)/../env.nu`)
- [x] Getting [value usage refactor #10121](https://github.com/nushell/nushell/pull/10121) unstuck/moving
- [ ] Plugins requesting stuff from Nushell's engine/stack
- e.g., how to read env vars from plugins? (`std::env:var` works but only for purely string variables, not for something structured like `$env.foo = {a: 1}`)
- Can/should plugins do more (e.g., be modules which define constants/aliases, change environment)?
- explore possibly storing state on the plugin side with a key/value embedded database like sled ?
- would having an embedded key/value database somewhere in the plugin flow of information help at all ?
## Discussed Topics
## uutils-nushell collab
### cp parameters
How many flags/options do we want to carry over.
Darren opened a voting spreadsheet: https://docs.google.com/spreadsheets/d/1aFXAg2IkHFCz289QYBroSn9XK_80lV3y7KEZxzeHw2c/edit#gid=0
green items are the first pass, as a starting point, not meaning we won't add any additional options later.
JT: some folks want their POSIX
- should there be a option/mode to enable full posix flag fest?
- ? where the option: JT maybe cargo flag / feature gate
Terts: a lot of the flags are around formatting, will probably not necessary
- start with the ones that are really necessary
David:
- a lot of code in the existing coreutils is around handling the flags/options etc.
- keeping the basics makes the porting easier
Terts: also finding the sweetspot **which commands to actually port**
Point David: added complication around spans / how nushell streams -> thus `cp` was really easy to get a feel for it
Terts: there are different levels of abstraction for the different uutils
- sometimes printing in the flow of the code
### how do we ship it?
- feature: `nuuu` uses the `uucp` crate as `cp`
Darren: would like to ship with the uu version.
David: only test suite failures are down to error output
**no feature flags, we ship uu version, have some `cp-old` still laying around for a few versions**
(comment storm: `cp-old` for better discoverability over `old-cp`)
JT: lean towards the `cp` uutils muscle memory but keep the set of flags tight
Release in three weeks
### details on uutils architecture
There is a core `uu_core` crate, in `uu_cp` reexport (so no direct dep but transitively)
goal to slim down `uu_core` (terts) as this would generally beneficial
### uutils release schedule
roughly 6 weeks (manual/non-strict)
### communication strategy
uutils doesn't have a central blog,
impact on nushell is larger at the moment, will shout out in the release notes
### Next commands to port
the crawl-walk-run (easy to hard sorting) [list](https://docs.google.com/spreadsheets/d/1MP9V8BTtcy_3DIUT8025yTcGrjkIJ-ZKFT0uvJFw0Lo/edit#gid=0)
Nushell has crossplatform focus, existing commands may behave differently
Terts: [Uutils Platform compatibility list](https://uutils.github.io/coreutils/book/platforms.html)
Darren: file-io/fs commands are a weak spot in nushell (platform support/permissions) would love to piggyback
> Cold-hard truth: the shell is responsible for globbing (in the posix world)
JT: also prioritize by popularity (should be useful in a modern world)
**Let's look at this list after we got `cp` in**
### next steps
David wants to prune down, based on our minimal flag list
Great to kick off the collaboration with the uutils team
## Loud feedback
Both on social media from JT's blog post and peeking into the survey freeform-text
### Background tasks
This is a frequent complaint, not trivial
Darren: pueue? seems to be evolving some modularity, worth a look if we can hitch hike
WindSoilder has been discussing with them in https://github.com/Nukesor/pueue/issues/363
Also Ctrl-Z and other signals that need to be managed properly
### Buckets of existing bash scripts
how to port from existing scripts/snippets
can we help here?
- compatibility layer to execute
- translation mode
- volume of flags
- the can of POSIX compatibility
Reilly: bash scripts that have a shebang are already not a problem if you have `bash` installed
Kubouch: environment management is still a pain. (e.g. activation scripts from tools, e.g. things that tack onto `.bashrc`)
How can we proactively help folks
Darren: there is a volume of legacy that will probably still remain in their ecosystem
David:
- Documentation
- how to launch a bash/zsh script inside the structured shell environment
- how to translate `foo >> .bashrc`
- Problems with install scripts from the web
- shebang behavior
## string interpolation in command argument position etc.
```bash
cd ($env.PWD)/crates/nu-command
```
can we get closer to bash.
##### existing alternatives:
instead of
```bash
cd ($env.PWD | path join "crates/nu-command")
```
or
```bash
cd $"($env.PWD)/crates/nu-command"
```
We would still need the parens (delimiting the end of vars)
### Drawbacks
- this syntax will not be universal
- highlighting etc. is not yet up to date
- breaking completions etc.
- cellpaths:
- will not allow cell-paths in the same way. you need to wrap different things in parens
- `nu --testbin cococo (ls | sort-by name | get name).1` will now break
- tension: ease of use for pure strings vs the structured data that is common in nushell
- tricky context/syntax shape
### Can we go further
`git --worktree=$env.PWD/foo/bar`
problematic to identify the end of the variable/cellpath with possibilities of file endings and what is all allowed for nu variable names. (introduces an additional alphabet you need to remember, )
footguns
we are currently and low on footguns
### Darren is choosing violence
"let's land the PR right until the release"
WindSoilder: we already can express it, this introduces additional complexity around
JT: I'll switch it to draft we can still try it out on our own
## Issues
> :bulb: the issues which [needs-core-team-attention](https://github.com/nushell/nushell/labels/needs-core-team-attention)
> :bulb: **Note**
> to list all the PRs currently [opened in `nushell/nushell`](https://github.com/nushell/nushell/pulls):
> ```nu
> gh pr list --json url,number,author,title
> | from json
> | each {|i|
> $"- [($i.number)]\(($i.url)\) ($i.title) \(@($i.author.login)\)"
> }
> | reverse
> | to text
> ```