Skip to content
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

sat and checksums are now git submodules #1285

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "vendor/zippy"]
path = vendor/zippy
url = https://github.com/guzba/zippy.git
[submodule "vendor/sat"]
path = vendor/sat
url = https://github.com/nim-lang/sat.git
[submodule "vendor/checksums"]
path = vendor/checksums
url = https://github.com/nim-lang/checksums.git
2 changes: 2 additions & 0 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ import std/os
switch("warning", "ObservableStores:off")
switch("define", "ssl")
switch("path", "vendor" / "zippy" / "src")
switch("path", "vendor" / "sat" / "src")
switch("path", "vendor" / "checksums" / "src")
4 changes: 1 addition & 3 deletions nimble.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ srcDir = "src"
installExt = @["nim"]

# Dependencies

requires "nim >= 0.13.0", "sat"
requires "checksums"
requires "nim >= 2.0.12"

when defined(nimdistros):
import distros
Expand Down
5 changes: 1 addition & 4 deletions src/nimble.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import std/options as std_opt

import strutils except toLower
from unicode import toLower
when defined(nimNimbleBootstrap):
import ../dist/sat/src/sat/sat
else:
import sat/sat
import sat/sat
import nimblepkg/packageinfotypes, nimblepkg/packageinfo, nimblepkg/version,
nimblepkg/tools, nimblepkg/download, nimblepkg/common,
nimblepkg/publish, nimblepkg/options, nimblepkg/packageparser,
Expand Down
6 changes: 1 addition & 5 deletions src/nimblepkg/checksums.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

import os, strformat, algorithm
import common, version, sha1hashes, vcstools, paths, cli

when defined(nimNimbleBootstrap):
import ../../dist/checksums/src/checksums/sha1
else:
import pkg/checksums/sha1
import pkg/checksums/sha1

type
ChecksumError* = object of NimbleError
Expand Down
5 changes: 1 addition & 4 deletions src/nimblepkg/nimblesat.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
when defined(nimNimbleBootstrap):
import ../../dist/sat/src/sat/[sat, satvars]
else:
import sat/[sat, satvars]
import sat/[sat, satvars]
import version, packageinfotypes, download, packageinfo, packageparser, options,
sha1hashes, tools, downloadnim

Expand Down
6 changes: 1 addition & 5 deletions src/nimblepkg/sha1hashes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

import strformat, strutils, json, hashes
import common

when defined(nimNimbleBootstrap):
import ../../dist/checksums/src/checksums/sha1
else:
import pkg/checksums/sha1
import pkg/checksums/sha1

type
InvalidSha1HashError* = object of NimbleError
Expand Down
5 changes: 1 addition & 4 deletions src/nimblepkg/vcstools.nim
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,7 @@ proc fastForwardMerge*(path: Path, remoteBranch, localBranch: string) =

when isMainModule:
import unittest, sequtils
when defined(nimNimbleBootstrap):
import ../../dist/checksums/src/checksums/sha1
else:
import pkg/checksums/sha1
import pkg/checksums/sha1

type
NameToVcsRevision = OrderedTable[string, Sha1Hash]
Expand Down
6 changes: 1 addition & 5 deletions tests/testscommon.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
{.used.}

import sequtils, strutils, strformat, os, osproc, sugar, unittest, macros

when defined(nimNimbleBootstrap):
import ../dist/checksums/src/checksums/sha1
else:
import pkg/checksums/sha1
import pkg/checksums/sha1

from nimblepkg/common import cd, nimblePackagesDirName, ProcessOutput
from nimblepkg/developfile import developFileVersion
Expand Down
1 change: 1 addition & 0 deletions vendor/checksums
Submodule checksums added at f8f6bd
1 change: 1 addition & 0 deletions vendor/sat
Submodule sat added at faf161
Loading