Coder Social home page Coder Social logo

cpm's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m Yassen Efremov
  • ๐Ÿ‘€ Iโ€™m interested in math, computers and space
  • ๐ŸŒฑ Iโ€™m currently studying at FMI
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate with my classmates and friends
  • ๐Ÿ“ซ How to reach me - [email protected]

Anurag's GitHub stats

cpm's People

Contributors

yassenefremov avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

cpm's Issues

Create basic package script

The script should be a json file (for now). It should store the package dependencies instead of the local package DB, which should be in the user's home directory anyway.

Create basic CLI

Should support the following commands:

  • install
  • remove
  • list
  • update

Should support the following flags:

  • --version
  • --help

Library: argparse

Write first chapter

Talk about client-registry, dependency management, package metadata, etc. and existing solutions (conan, vcpkg, npm, pip).

Create basic local package DB

The DB should contain a table that stores the installed package's names (for now).

On cpm install <package-name> -> add <package name> to the DB.
On cpm remove <package-name> -> remove <package name> from the DB.

Libraries: Databases

Recursively install package dependencies

When installing a package, it's cpm_pack.json should be parsed and all of the dependencies listed in there should be installed as well. After that all of the dependencies dependencies should also be installed and so on...

Add lockfile support

A lockfile should be generated when installing new packages and it should be used to install a package's dependencies.

Add error handling for sqlite and create custom exceptions

Because sqlite's error messages are dynamically allocated, throwing an exception with one makes it impossible to free the char * containing the message afterwords. To fix this a custom exception could be made that frees the error message in its destructor.

Implement basic `create` command

This command should create a new package in the current working directory, e.g. it should create a package.json file with the package name and version.

Improve dependency installation algorithm

pseudocode:

install() {
    for d in package.deps:
        if not d.installed:
            install(d)
    zip = download(package)
    extract(zip, "{cwd}/lib")

    for d in package.deps:
        symlink("lib/{d}", "d")
}

Save logs to file

The program should log more detailed information to a log file during it's execution and when an error occurs.

Add option for global package installation

Packages could be installed in two ways:

  • locally to the project (no additional arguments needed, installed in cpm_pack.json)
  • globally to the user (-g/--global, installed in packages.db3) (also remove/list -g)
  • globally to the system (-s/--system, installed in packages.db3)

Fix local package DB

  • primary keys should be formed from both the package name version
  • rename same files/tables?

Tell the user how to use installed packages

After the install command has finished executing, a message should be displayed that tells the user what to add to their CMakeLists.txt in order to use the installed package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.