zenvoich / mops Goto Github PK
View Code? Open in Web Editor NEWPackage manager for the Motoko programming language
Home Page: https://mops.one
License: MIT License
Package manager for the Motoko programming language
Home Page: https://mops.one
License: MIT License
name, email, site, twitter...
I tried to add an alternate base as @di-wu does in https://github.com/aviate-labs/json.mo and I get an odd error on mops install
[dependencies]
base = "https://github.com/dfinity/motoko-base#494824a2787aee24ab4a5888aa519deb05ecfd60"
xtendedNumbers = "https://github.com/edjcase/motoko_numbers#v1.0.0"
base-0.7.3 = "https://github.com/dfinity/motoko-base#3a20693fc597b96a8c7cf8645fda7a3534d13e5fbda28c00d01f0b7641efe494"
[package]
name = "candid"
version = "0.1.0"
description = "A Candid library for encoding and decoding candid bytes"
repository = "https://github.com/edjcase/motoko_candid"
mops install
file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:130
if (data.startsWith('https://github.com/')){
^
TypeError: data.startsWith is not a function
at file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:130:12
at Array.forEach (<anonymous>)
at readConfig (file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:129:23)
at Command.<anonymous> (file:///opt/homebrew/lib/node_modules/ic-mops/cli.js:43:13)
at Command.listener [as _actionHandler] (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:482:17)
at /opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1264:65
at Command._chainOrCall (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1158:12)
at Command._parseCommand (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1264:27)
at /opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1062:27
at Command._chainOrCall (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1158:12)
Hi @ZenVoich,
I noticed that the uploaded files are currently being stored as an array of blobs in heap memory. I would like to propose a change that would store these files in stable memory once they have finished uploading, in order to take advantage of the extra 32 GB of space in stable memory.
The proposed design is as follows:
activeUploadsChunks
and store them contiguously in stable memory using the ExperimentalStableMemory
module.File
type in a new TrieMap<FileId, File>
called files
.type File = {
offset: Nat64;
size: Nat:
}
I believe that this change would help us make better use of the available stable memory and improve the overall performance of the system. Let me know what you think!
Are there currently any plans to add a license to this repository? A few people have asked me about this, so it could be helpful to specify a license for the project (such as MIT or Apache 2.0).
I am a IC dev and am looking to help get Motoko to get to maturity faster
One of those factors is not only building the Motoko libraries but the accessibility/discovery of them
What's the general long term strategy of the MOPS project?
Currently I see vessel and mops but vessel seems to be the 'default' but is essentially just a wrapper around github projects and hard coded project ids.
I am curious if you have thought about vessel as a competitor or rather a different client that can share repositories and work together?
Do you have any plans on developer adoption or is this just in the building phases right now.
I personally have only used vessel so im not sure what the MOPS experience is like right now
I created a project for the tests. Mistake
"Installing: No such file or directory"
I,m using vesssel-dhall. There are no problems in it
Are there any plans to send the fuzz library to vessel-dhall?
Just wondering if DFX is actually needed for running MOPS tests. Im trying to use it in my github actions and I get this error. Its fine if it is needed, just wanted to make sure
Run make test
mops test
Test files:
• test/Parser.test.mo
• test/Tokenizer.test.mo
--------------------------------------------------
/bin/sh: 1: dfx: not found
node:internal/errors:857
const err = new Error(message);
^
Error: Command failed: dfx cache show
/bin/sh: 1: dfx: not found
at checkExecSyncError (node:child_process:861:11)
at execSync (node:child_process:932:15)
at runAll (file:///opt/hostedtoolcache/node/16.19.1/x6[4](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:5)/lib/node_modules/ic-mops/commands/test.js:82:14)
at async test (file:///opt/hostedtoolcache/node/16.19.1/x64/lib/node_modules/ic-mops/commands/test.js:4[5](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:6):1[6](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:7))
at async Command.<anonymous> (file:///opt/hostedtoolcache/node/16.19.1/x64/lib/node_modules/ic-mops/cli.js:162:3) {
status: 12[7](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:8),
signal: null,
output: [
null,
Buffer(0) [Uint[8](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:9)Array] [],
Buffer(27) [Uint8Array] [
47, [9](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:10)8, [10](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:11)5, [11](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:12)0, 47, 115, 104,
58, 32, 49, 58, 32, 100, 102,
[12](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:13)0, 58, 32, 110, 111, 116, 32,
102, 111, 117, 110, 100, 10
]
],
pid: 1754,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(27) [Uint8Array] [
47, 98, 105, 110, 47, 1[15](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:16), 104,
58, 32, 49, 58, 32, 100, 102,
120, 58, 32, 110, 111, 1[16](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:17), 32,
102, 111, 1[17](https://github.com/edjCase/motoko_xml/actions/runs/4311036418/jobs/7520039853#step:6:18), 110, 100, 10
]
}
make: *** [Makefile:6: test] Error 1
Error: Process completed with exit code 2.
test
packagedhall-to-json
working with pkg
how to update information https://mops.one/mal
how can I delete the library and re-upload it?
I've recently been directing Vessel users towards MOPS, and it appears that a lot of people are under the impression that MOPS only supports the on-chain registry (and not GitHub / Vessel packages).
A quick example of installing a GitHub package in the setup instructions on mops.one would probably make a big difference, especially for all the new developers who are currently in Motoko Bootcamp.
Thanks again for your work on this package manager!
Context: dfinity/vessel#66 (comment)
Forbid publishing a package with local dependencies.
related #16
After installing via npm i -g ic-mops
, all mops commands fail due to:
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'stream' imported from /usr/local/lib/node_modules/ic-mops/vessel.js
at new NodeError (internal/errors.js:322:7)
at packageResolve (internal/modules/esm/resolve.js:732:9)
at moduleResolve (internal/modules/esm/resolve.js:773:18)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
at link (internal/modules/esm/module_job.js:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node version: 14.20
NPM version: 9.2.0
Mops version: 0.2.1
Hey @ZenVoich,
I've started working on integration for GitHub and vessel.
I want to use this issue to discuss the design of this new feature and track my progress.
mops.toml
filevessel.dhall
and package-set.dhall
files in GitHub dependenciesmops.toml
from vessel.dhall
if it exists in the root dirmops sources
commandPackages installed from GitHub by the mops
cli are stored like this:
[name] = "[url]#[version or branch]"
Itertools = "https://github.com/NatLabs/Itertools.mo#v0.1.0"`
Itertools = "https://github.com/NatLabs/Itertools.mo#main"
If no branch/version is specified, the branch defaults to master
I've updated the install command to install a dependency from GitHub if it starts with https://github.com
or contains a forward slash, for instance, NatLabs/Itertools.mo
The user might also want to specify the branch/version of the lib.
What do you think about adding a new parameter that accepts the lib's version?
mops import NatLabs/Itertools.mo v0.1.0
mops import https://github.com/NatLabs/Itertools.mo main
Or would it be better to concatenate the version with the repo's URL?
mops import NatLabs/Itertools.mo#v0.1.0
mops import https://github.com/NatLabs/Itertools.mo#main
The current Motoko representation is
public type Dependency = {
name: PackageName; // max 50
version: Text; // max 20
};
I want to change it to
public type Dependency = {
name: PackageName; // max 50
repo: Text; // max unknown
version: Text; // max 20
};
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.