nevalang / neva

🌊 Flow-based programming language with static types and implicit parallelism. Compiles to native code and Go
https://nevalang.org
MIT License
75 stars 6 forks source link

[STD]: `os` components for ENV #586

Open emil14 opened 4 weeks ago

emil14 commented 4 weeks ago

Basically we have low level and high level functionality and which one needs to be implemented first
is not clear

Low level

We need to mimic these Go's os functions

High level

We need a way of defining the configuration structures without directly using the low level functions.

Reference https://github.com/sethvargo/go-envconfig

emil14 commented 4 weeks ago
component GetEnv(name string) (data string, err error)

component SetEnv(name string, data string) (data string, err error)

Now about Environ - in Go it returns slice of key=value strings which doesn't looks handy.

component Environ(sig any) (seq stream<MapEntry<string>>, err error)
emil14 commented 4 weeks ago

Generated Documentation

We could generate e.g. markdown file automatically from configuration

Reference https://github.com/g4s8/envdoc

We need to think tho what should be the source of truth - source code or some kind of schema. We could even have this inside neva.yaml and an env field