All Projects → libling → sbt-hackling

libling / sbt-hackling

Licence: Apache-2.0 license
Prototype of the Libling concept. Libling is a way to add source dependencies to your sbt project.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to sbt-hackling

merge-confidence
The home of WhiteSource's Merge Confidence feature, for Renovate and WhiteSource Remediate
Stars: ✭ 41 (+215.38%)
Mutual labels:  dependency-manager, dependencies, dependency
Cpm.cmake
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
Stars: ✭ 560 (+4207.69%)
Mutual labels:  dependency-manager, dependencies, dependency
Pyup
A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
Stars: ✭ 379 (+2815.38%)
Mutual labels:  dependency-manager, dependency
Patch Package
Fix broken node modules instantly 🏃🏽‍♀️💨
Stars: ✭ 6,062 (+46530.77%)
Mutual labels:  dependency-manager, dependencies
upgreat
CLI for a painless way to upgrade your package.json dependencies!
Stars: ✭ 47 (+261.54%)
Mutual labels:  dependency-manager, dependencies
Webpack Babel Env Deps
Find dependencies to transpile with Babel.
Stars: ✭ 130 (+900%)
Mutual labels:  dependencies, dependency
Athens
A Go module datastore and proxy
Stars: ✭ 3,736 (+28638.46%)
Mutual labels:  dependency-manager, dependencies
Renovate
Universal dependency update tool that fits into your workflows.
Stars: ✭ 6,700 (+51438.46%)
Mutual labels:  dependency-manager, dependencies
Kodein Mvvm
Example app using Kodein for dependency injection with MVVM and Architecture Components
Stars: ✭ 26 (+100%)
Mutual labels:  dependency-manager, dependency
Container Ioc
Inversion of Control container & Dependency Injection for Javascript and Node.js apps powered by Typescript.
Stars: ✭ 89 (+584.62%)
Mutual labels:  dependency-manager, dependency
Greenkeeper
🤖 🌴 Real-time automated dependency updates for npm and GitHub
Stars: ✭ 1,564 (+11930.77%)
Mutual labels:  dependency-manager, dependencies
hardhat-dependency-compiler
📦 Compile Solidity sources directly from NPM dependencies
Stars: ✭ 19 (+46.15%)
Mutual labels:  dependencies, dependency
Boss
Dependency Manager for Delphi
Stars: ✭ 188 (+1346.15%)
Mutual labels:  dependency-manager, dependency
Projeny
A project and package manager for Unity
Stars: ✭ 656 (+4946.15%)
Mutual labels:  dependency-manager, dependency
Protodep
Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Stars: ✭ 167 (+1184.62%)
Mutual labels:  dependency-manager, dependencies
py-dependency-install
A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates
Stars: ✭ 23 (+76.92%)
Mutual labels:  dependency-manager, dependency
mdlr
MDLR ("Modular") gives you declarative and easy Git 'submodules without the pain of submodules'
Stars: ✭ 26 (+100%)
Mutual labels:  dependency-manager
PackageProject.cmake
🏛️ Help other developers use your project. A CMake script for packaging C/C++ projects for simple project installation while employing best-practices for maximum compatibility.
Stars: ✭ 48 (+269.23%)
Mutual labels:  dependency
ote
ote updates a packages' go.mod file with a comment next to all dependencies that are test dependencies; identifying them as such.
Stars: ✭ 25 (+92.31%)
Mutual labels:  dependency
taze
🥦 A modern cli tool that keeps your deps fresh
Stars: ✭ 682 (+5146.15%)
Mutual labels:  dependencies

Gitter chat Build Status Download

sbt-hackling

Hackathon implementation of the Libling concept. It's a prototype. It works, but exactly what and how works might break at any time.

This is an experimental platform. You are encouraged to submit changes. Almost anything will be accepted without much fuss.

Libling

Libling is a way to add dependencies to your project as plain Scala sources. It is intended for simple snippets of code or small libraries (for now).

Motivation

  • Publishing simple libraries is unnecessarily hard in JVM land. Why not just push to GitHub and be done with it?
  • Even when code is source compatible with multiple Scala versions, need to cross-build it. Makes builds more complicated!
  • With scala.js and Scala Native, even more cross building is necessary!
  • Classical major.minor.bugfix versioning is a hack! A git commit graph is closer to what's going on, a commit hash uniquely identifies a version and its history.
  • take advantage of distributed VCS possibilities. Cloning a repo mirrors all the versions so far, can be cached. Does not require single-source-of-truth centralized infrastructure. This makes forking trivial.

Actually the latter two are the true motivation and the first three are a way to justify a practical experiment

Features

  • declare dependencies on liblings in your build.sbt via git commit hash
  • a commit hash may be resolved from remote and local repos
  • dependencies are resolved transitively
  • repos are cached locally
  • install them as sources, including markdown docs

Still kind of missing features

  • friendly DSL
  • finding and resolving dependency conflicts by eviction or something
  • resolving conflicts by rewriting packages
  • a way to upgrade dependencies automatically
  • automatic index of liblings with a task to publish a libling
  • (maybe) resolving binary dependencies. For now it's assumed a libling only depends on the Scala stdlib.

Not in scope

  • advanced builds. Liblings have a fixed structure and only depend on other liblings. But your build can depend on both liblings and regular binary libraries.

To use a libling

Add this plugin:

resolvers += Resolver.bintrayIvyRepo("jastice","sbt-plugins")
addSbtPlugin("libling" % "sbt-hackling" % "0.4.0")

Add a libling source dependency by commit hash:

sourceDependencies += Dependency(
        HashVersion("<git commit long hash>"),
        Repositories(uri("<https git repository uri>")))

Add a libling source dependency by tag or branch name:

sourceDependencies += Dependency(
        NameVersion("<tag or branch>"),
        Repositories(uri("<https git repository uri>")))

On the sbt shell:

> liblingInstall

This will:

  • cache repos locally in <user home>/.libling/cache
  • copy sources and docs out of the repos into your project under target/libling/
  • generate a /libling directory in your project that contains a lock file that exactly identifies the commit hashes you depend on and the repos where they were found

Examples

To create a libling

sbt new libling/libling.g8

See libling.g8 for details.

structure

A libling is just a bunch of code in a certain structure. When you include a libling into your sbt project, some code gets dumped into your /target/libling directory and becomes part of your build.

  • README.md documentation root. can link to further docs in /doc directory.
  • /src Contains plain Scala sources, no main/ test/ etc. Always included on libling resolution. We'll figure out later how to build more complicated stuff.
  • /doc .md sources - included by default.
  • /libling
    • lock: the libling's own libling dependencies, including transitive dependencies. Commit hashes only. These are generated by the liblingUpdate task and should not be manually edited. A libling can only depend on other liblings. We'll figure out how to handle necessary binary deps (e.g. scala version) later. HOCON format.
    • meta: useful metadata where to look up the commit hashes. Can be generated by liblingGenerateMetadata task. HOCON format.
  • /test
    • tests go in here. Not included as dependency by default.

Inspirations

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].