Skip to content

Commit

Permalink
clone sat (#119)
Browse files Browse the repository at this point in the history
* clone sat

* fixes

* fixes

* uses nimAtlasBootstrap

* Apply suggestions from code review
  • Loading branch information
ringabout authored Mar 27, 2024
1 parent 1a95780 commit 5faec3e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 890 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
- name: Run tests
run: |
cd atlas
nimble install -y sat
nim c -r tests/tester.nim
- name: Test install with Nimble
Expand Down
1 change: 1 addition & 0 deletions atlas.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bin = @["atlas"]
# Dependencies

requires "nim >= 2.0.0"
requires "sat"

task docs, "build Atlas's docs":
exec "nim rst2html --putenv:atlasversion=$1 doc/atlas.md" % version
1 change: 1 addition & 0 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ task tester, "Runs integration tests":
exec "nim c -d:debug -r tests/tester.nim"

task buildRelease, "Build release":
exec "nimble install -y sat"
when defined(macosx):
let x86Args = "\"-target x86_64-apple-macos11 -arch x86_64 -DARCH=x86_64\""
exec "nim c -d:release --passC:" & x86args & " --passL:" & x86args & " -o:./atlas_x86_64 src/atlas.nim"
Expand Down
7 changes: 6 additions & 1 deletion src/atlas.nim
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
## a Nimble dependency and its dependencies recursively.

import std / [parseopt, strutils, os, osproc, tables, sets, json, jsonutils]
import versions, context, osutils, packagesjson, sat, gitops, nimenv, lockfiles,
import versions, context, osutils, packagesjson, gitops, nimenv, lockfiles,
depgraphs, confighandler, configutils, cloner, nimblechecksums, reporters,

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / linux-amd64-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / linux-amd64-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-amd64-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-amd64-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-amd64-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-amd64-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-i386-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-i386-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-i386-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / windows-i386-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / macos-amd64-nim-devel (master)

imported and not used: 'nimblechecksums' [UnusedImport]

Check warning on line 14 in src/atlas.nim

View workflow job for this annotation

GitHub Actions / macos-amd64-nim-devel (master)

imported and not used: 'cloner' [UnusedImport]
nimbleparser, pkgurls

from std/terminal import isatty

when defined(nimAtlasBootstrap):
import ../dist/sat/src/sat/sat
else:
import sat/sat

const
AtlasVersion =
block:
Expand Down
7 changes: 6 additions & 1 deletion src/depgraphs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

import std / [sets, tables, os, strutils, streams, json, jsonutils, algorithm]

import context, satvars, sat, gitops, runners, reporters, nimbleparser, pkgurls, cloner, versions
import context, gitops, runners, reporters, nimbleparser, pkgurls, cloner, versions

when defined(nimAtlasBootstrap):
import ../dist/sat/src/sat/[sat, satvars]
else:
import sat/[sat, satvars]

type
DependencyVersion* = object # Represents a specific version of a project.
Expand Down
7 changes: 6 additions & 1 deletion src/nimbleparser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
#

import std / [os, strutils, tables, unicode, hashes]
import versions, satvars, packagesjson, reporters, gitops, parse_requires, pkgurls, compiledpatterns
import versions, packagesjson, reporters, gitops, parse_requires, pkgurls, compiledpatterns

when defined(nimAtlasBootstrap):
import ../dist/sat/src/sat/satvars
else:
import sat/satvars

type
DependencyStatus* = enum
Expand Down
Loading

0 comments on commit 5faec3e

Please sign in to comment.