Repository navigation
Parse deps.edn and bb.edn dependencies and alias deps - #183
Open
abhinavgautam01 wants to merge 1 commit into
Open
abhinavgautam01 wants to merge 1 commit into
abhinavgautam01 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #77 (the Clojure item).
Summary
Adds a
clojarsmanifest parser for tools.depsdeps.ednand babashkabb.edn, next to the existingproject.cljparser, on top of a small EDN reader.EDN reader
internal/clojure/edn.goreads maps, vectors, lists, sets, strings, keywords, symbols, numbers and characters. It also handles;comments, commas,#_discards, tagged literals such as#inst "..."(read as the value they tag) and^metadata (dropped). Nesting is capped at 100 levels, including through discards, metadata and tags, so hostile input returns aParseErrorinstead of exhausting the stack, the same protection the Erlang term reader got in #174.Coordinates
{:mvn/version "1.11.1"}Version: 1.11.1org.lwjgl/lwjgl$natives-linuxName: org.lwjgl/lwjgl, location keeps the classifier{:git/url U :git/sha S :git/tag T :deps/root R}gitsource withRef: S,Tag: T,Rel: R{:git/url U :sha S}(older keys):sha/:tagio.github.user/repo {:git/sha S}https://github.com/user/repo.git, as tools.deps does (alsoio.gitlab,io.bitbucketand theircom./org.forms){:local/root "../lib"}pathsourceGit and local dependencies keep their name and PURL with the source recorded, as
Cargo.tomlandrebar.configgit dependencies do.Scopes and locations
:depsareruntimeunderdeps/<lib>.:extra-deps,:replace-depsand:depsare reported underaliases/<alias>/<key>/<lib>. An alias name containingtestgivestestscope,build(orbuild/...) givesbuildand any other alias givesdevelopment.:override-depsand:default-depsonly adjust versions, so they are not reported.bb.edn,:podsare babashka pods rather than libraries and are not reported.:mvn/reposis not read here. It could becomeRegistriesin a follow-up.Tests
internal/clojure/edn_test.gocovers each EDN form, discards, tags, metadata, syntax errors and the depth limit at exactly 100 levels and beyond.internal/clojure/deps_test.gocovers both fixtures exactly (scopes, git and local sources, inferred URLs, classifiers, locations), malformed entries, non-map input, alias scope rules and URL inference.clojure_deps_test.gogoes throughParse, checking PURLs on dependencies and declarations.TestIdentifyFilesandTestParseAllEcosystems.testdata/clojure/deps.ednandtestdata/clojure/bb.edn.go build ./...,go vet ./...,go test ./...andgolangci-lint run ./...all pass.