unbundle fusion (#16925)
* unbundle fusion * changelog * address comment: `./koch fusion` calls nimble install fusion (at a fixed hash)
This commit is contained in:
parent
d4f7f1d8f3
commit
b7dd8e7dff
6 changed files with 13 additions and 20 deletions
4
.github/workflows/ci_docs.yml
vendored
4
.github/workflows/ci_docs.yml
vendored
|
|
@ -126,10 +126,6 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./koch boot -d:release
|
run: ./koch boot -d:release
|
||||||
|
|
||||||
- name: 'Clone fusion'
|
|
||||||
shell: bash
|
|
||||||
run: ./koch fusion
|
|
||||||
|
|
||||||
- name: 'Build documentation'
|
- name: 'Build documentation'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./koch doc --git.commit:devel
|
run: ./koch doc --git.commit:devel
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -66,7 +66,7 @@ testament.db
|
||||||
/tests/**/*.js
|
/tests/**/*.js
|
||||||
/csources
|
/csources
|
||||||
/dist/
|
/dist/
|
||||||
/lib/fusion
|
# /lib/fusion # fusion is now unbundled; `git status` should reveal if it's there so users can act on it
|
||||||
|
|
||||||
# Private directories and files (IDEs)
|
# Private directories and files (IDEs)
|
||||||
.*/
|
.*/
|
||||||
|
|
|
||||||
|
|
@ -187,3 +187,6 @@ with other backends. see #9125. Use `-d:nimLegacyJsRound` for previous behavior.
|
||||||
- cell alignment is not supported, i.e. alignment annotations in a delimiter
|
- cell alignment is not supported, i.e. alignment annotations in a delimiter
|
||||||
row (`:---`, `:--:`, `---:`) are ignored,
|
row (`:---`, `:--:`, `---:`) are ignored,
|
||||||
- every table row must start with `|`, e.g. `| cell 1 | cell 2 |`.
|
- every table row must start with `|`, e.g. `| cell 1 | cell 2 |`.
|
||||||
|
|
||||||
|
- `fusion` is now un-bundled from nim, `./koch fusion` will
|
||||||
|
install it via nimble at a fixed hash.
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ Files: "lib"
|
||||||
[Other]
|
[Other]
|
||||||
Files: "examples"
|
Files: "examples"
|
||||||
Files: "dist/nimble"
|
Files: "dist/nimble"
|
||||||
Files: "dist/fusion"
|
|
||||||
|
|
||||||
Files: "tests"
|
Files: "tests"
|
||||||
|
|
||||||
|
|
|
||||||
21
koch.nim
21
koch.nim
|
|
@ -11,8 +11,9 @@
|
||||||
|
|
||||||
const
|
const
|
||||||
NimbleStableCommit = "324de9202fb3db82b266e7350731d1ec41013a2b" # master
|
NimbleStableCommit = "324de9202fb3db82b266e7350731d1ec41013a2b" # master
|
||||||
FusionStableCommit = "372ee4313827ef9f2ea388840f7d6b46c2b1b014"
|
# examples of possible values: #head, #ea82b54, 1.2.3
|
||||||
|
FusionStableHash = "#372ee4313827ef9f2ea388840f7d6b46c2b1b014"
|
||||||
|
HeadHash = "#head"
|
||||||
when not defined(windows):
|
when not defined(windows):
|
||||||
const
|
const
|
||||||
Z3StableCommit = "65de3f748a6812eecd7db7c478d5fc54424d368b" # the version of Z3 that DrNim uses
|
Z3StableCommit = "65de3f748a6812eecd7db7c478d5fc54424d368b" # the version of Z3 that DrNim uses
|
||||||
|
|
@ -66,7 +67,8 @@ Possible Commands:
|
||||||
e.g. nimble)
|
e.g. nimble)
|
||||||
doesn't require network connectivity
|
doesn't require network connectivity
|
||||||
nimble builds the Nimble tool
|
nimble builds the Nimble tool
|
||||||
fusion clone fusion into the working tree
|
fusion installs fusion via Nimble
|
||||||
|
|
||||||
Boot options:
|
Boot options:
|
||||||
-d:release produce a release version of the compiler
|
-d:release produce a release version of the compiler
|
||||||
-d:nimUseLinenoise use the linenoise library for interactive mode
|
-d:nimUseLinenoise use the linenoise library for interactive mode
|
||||||
|
|
@ -180,14 +182,7 @@ proc bundleWinTools(args: string) =
|
||||||
nimCompile(r"tools\downloader.nim",
|
nimCompile(r"tools\downloader.nim",
|
||||||
options = r"--cc:vcc --app:gui -d:ssl --noNimblePath --path:..\ui " & args)
|
options = r"--cc:vcc --app:gui -d:ssl --noNimblePath --path:..\ui " & args)
|
||||||
|
|
||||||
proc bundleFusion(latest: bool) =
|
|
||||||
let commit = if latest: "HEAD" else: FusionStableCommit
|
|
||||||
cloneDependency(distDir, "https://github.com/nim-lang/fusion.git", commit,
|
|
||||||
allowBundled = true)
|
|
||||||
copyDir(distDir / "fusion" / "src" / "fusion", "lib" / "fusion")
|
|
||||||
|
|
||||||
proc zip(latest: bool; args: string) =
|
proc zip(latest: bool; args: string) =
|
||||||
bundleFusion(latest)
|
|
||||||
bundleNimbleExe(latest, args)
|
bundleNimbleExe(latest, args)
|
||||||
bundleNimsuggest(args)
|
bundleNimsuggest(args)
|
||||||
bundleNimpretty(args)
|
bundleNimpretty(args)
|
||||||
|
|
@ -227,7 +222,6 @@ proc buildTools(args: string = "") =
|
||||||
options = "-d:release " & args)
|
options = "-d:release " & args)
|
||||||
|
|
||||||
proc nsis(latest: bool; args: string) =
|
proc nsis(latest: bool; args: string) =
|
||||||
bundleFusion(latest)
|
|
||||||
bundleNimbleExe(latest, args)
|
bundleNimbleExe(latest, args)
|
||||||
bundleNimsuggest(args)
|
bundleNimsuggest(args)
|
||||||
bundleWinTools(args)
|
bundleWinTools(args)
|
||||||
|
|
@ -694,12 +688,13 @@ when isMainModule:
|
||||||
of "tools":
|
of "tools":
|
||||||
buildTools(op.cmdLineRest)
|
buildTools(op.cmdLineRest)
|
||||||
bundleNimbleExe(latest, op.cmdLineRest)
|
bundleNimbleExe(latest, op.cmdLineRest)
|
||||||
bundleFusion(latest)
|
|
||||||
of "pushcsource", "pushcsources": pushCsources()
|
of "pushcsource", "pushcsources": pushCsources()
|
||||||
of "valgrind": valgrind(op.cmdLineRest)
|
of "valgrind": valgrind(op.cmdLineRest)
|
||||||
of "c2nim": bundleC2nim(op.cmdLineRest)
|
of "c2nim": bundleC2nim(op.cmdLineRest)
|
||||||
of "drnim": buildDrNim(op.cmdLineRest)
|
of "drnim": buildDrNim(op.cmdLineRest)
|
||||||
of "fusion": bundleFusion(latest)
|
of "fusion":
|
||||||
|
let suffix = if latest: HeadHash else: FusionStableHash
|
||||||
|
exec("nimble install -y fusion@$#" % suffix)
|
||||||
else: showHelp()
|
else: showHelp()
|
||||||
break
|
break
|
||||||
of cmdEnd: break
|
of cmdEnd: break
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ lib/system/widestrs.nim
|
||||||
proc follow(a: PathEntry): bool =
|
proc follow(a: PathEntry): bool =
|
||||||
result = a.path.lastPathPart notin ["nimcache", htmldocsDirname,
|
result = a.path.lastPathPart notin ["nimcache", htmldocsDirname,
|
||||||
"includes", "deprecated", "genode"] and
|
"includes", "deprecated", "genode"] and
|
||||||
not a.path.isRelativeTo("lib/fusion")
|
not a.path.isRelativeTo("lib/fusion") # fusion was un-bundled but we need to keep this in case user has it installed
|
||||||
for entry in walkDirRecFilter("lib", follow = follow):
|
for entry in walkDirRecFilter("lib", follow = follow):
|
||||||
let a = entry.path
|
let a = entry.path
|
||||||
if entry.kind != pcFile or a.splitFile.ext != ".nim" or
|
if entry.kind != pcFile or a.splitFile.ext != ".nim" or
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue