-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start a design document #2
Conversation
A WIP of a design document. Still has some parts to fill in
To summarize our meeting with @amtoine @kubouch @Yethal (I might have missed something, as I've written it down after meeting). Please add whatever I have forgotten to do so 😅
I'm off today, but I will surely try to add something to the design document on Monday |
thanks @skelly37, that looks very complete with what i remember from the meeting 👌 |
Also, regarding configuration: How about using profiles? We won't end up with a ridiculous amount of envs, the users won't be forced to edit json/nuon/whatever by themselves. And one could have multiple configs on their machine, they could be copy-pasted etc... e.g. For example conan uses that: https://docs.conan.io/1/reference/profiles.html |
i've made some tiny tweaks to the document => the API still is the biggest missing part 👌 |
Regarding installation:
IMO installing packages over HTTP is a better choice
|
❓ a question regarding this |
I mentioned this during the call and then totally forgot about it. I'd like to include a set of helpers for with the module (maybe as a submodule that is not exported by default) to be used in build.nu scripts so that package maintainers do not have to reinvent the wheel and come up with 100 different ways to e.g download a file. Examples of such helpers that come to mind:
|
I thought I will post the metadata.md suggestion here, so it won't got lost on discord 😅 # `nupm`'s package metadata reference
## Required attributes
- `author`: Name of the developer/organization/etc.
- `files`: List of records of files being part of the package. Records reference:
- `checksum`: SHA256 sum of the file
- `name`: File path (relative to the package scope)
- `raw-url`: `GET`table link to the file
- `supported-os`: Exactly like in the top-level metadata
- `name`: Package name
- `nu-version`: Supported Nushell version. Just like `dependencies` might be either exact version or some matcher like "greater than 1.70"
- `short-description`: Short info about the package, displayed by default
- `supported-os`: Operating systems supported by the package, the most broad possibility: `{"arch": ["*"], "family": ["*"], "name": ["*"]}`. Matched by `$nu.os-info`
- `url`: Package website/GitHub repository. Basically a place where one can find some additional info about the package
- `version`: Version of the package. Semantic versioning is advised to enable users to have more generic requirements
## Optional attribtues
- `dependencies`: Packages needed by the package — versions have to be specified. e.g. `[nupm/0.7.0]`. Semantic versioning is also supported: `[nupm/~0.7]`
- `installer`: Name of a script (relative to the package scope) that will install the package instead (or in addition to) of default `nupm` logic
- `keywords`: List of keywords used by `nupm search` in addition to `name`
- `pre-install-hook`: Name of a script (relative to the package scope) to be executed before installation. Might be simple pre-install message or more complex logic
- `post-install-hook`: Name of a script (relative to the package scope) to be executed after installation. Might be simple post-install message or more complex logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait to actually start implementing it, great job everyone with this brainstorming 😋
Some changes I did:
Two things I don't agree with:
|
Split required attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, if everyone is OK with these, we can merge it.
@kubouch I'm afraid you misunderstood the intent. It was about the description of packages, that will be displayed when doing some actions like search. It's actually my bad that I missed it when preparing the metadata.md file. But I won't argue if you wouldn't want that anyway. So, either make |
Ah, oops, I misread, I put the long description back |
A WIP of a design document. Still has some parts to fill in
should close #1 by moving all the design into
DESIGN.md
👍👉 see the document here