Nushell core team meeting 2024-03-27

Attendees

  • Jack
  • Devyn
  • Filip
  • Stefan
  • Ed
  • Ian
  • Michael
  • Andy (ndyg)
  • Antoine
  • Jakub (at the end of the meeting due to DST confusion)

Agenda

  • Devyn: modularizing nu-plugin
  • recursion panics
  • nu in nu, run command

Discussed Topics

splitting up the nu-plugin crate

  • two parts
    • engine interface side
    • plugin interface for public consumption by plugin authors
  • shared type definitions
  • stability concerns stronger for the plugin author side if we mature
    • #[doc(hidden)] everywhere
  • possibly three crates for the shared types (also require stability)
    • nu-plugin remains the public consumption crate
  • we currently don't reexport the types from the internal crates but expect the plugin authors to use them
    • stability concerns for the evolution of our internals
    • consider splitting nu-protocol to aid nu-plugin API stability
  • plugin authors would need to depend only on nu-plugin / nu-protocol (the rest would be transitive dependency and we could solve some problems through reexport)

Generally: support for splitting up nu-plugin (ship after the release)

Sideshow: nu-parsers dependency on nu-plugin

  • still depends on the register implementation to get the plugin signatures into the engine state so the parser is in a consistent state

Panic on recursion

  • panic under the following condition
    • recursive function
    • Taking in $in
    • invoked from the repl (no problem in a script)
  • panic occurs before execution (at parse time in the repl)
  • trying to mutate a block that is marked as non mutable
  • seems to be part of $in variable handling

nu in nu

  • Devyn's proposal: have a separate run command with explicit semantics to run a .nu script as if it were a regular function so you get structured data output
    • no need to merge into the main EngineState unlike source, so can be run in background/parallel

side-topic: background tasks

  • Fancy solutions:
  • Ian's basic backgrounding
    • reedline external printer is an open challenge
    • could always disconnect background jobs from terminal as a (temporary?) workaround
    • talked about having background tasks run a closure rather than an external command, now that we have good I/O redirection

side-topic: filedescriptor redirection/ FIFO/ named pipes /process substitution

  • FIFO don't exist like that on win
  • can't really do arbitrary file descriptors on windows either, that way

feature request: !bang like bash

  • reedline supports !! but not !bang to find a matching command
  • requested by Jack
  • Stefan: take it out of reedline, and have a hook to expand something, let nushell do it?
Select a repo