aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2020-03-09 23:12:11 -0500
committerGanesh Viswanathan <dev@genotrance.com>2020-03-09 23:12:11 -0500
commitda9a1c983b02a0829e5054e23aab99ceacd6c79c (patch)
treeaa8d73efa7c6193a9b5f9bed68b854c8b465c54b
parent1b63a125c527668b2e75080b62435d0b888d457f (diff)
downloadnimterop-da9a1c983b02a0829e5054e23aab99ceacd6c79c.tar.gz
nimterop-da9a1c983b02a0829e5054e23aab99ceacd6c79c.zip
Drop 0.19.6, fix soloud test
-rw-r--r--.travis.yml4
-rw-r--r--appveyor.yml2
-rw-r--r--nimterop.nimble2
-rw-r--r--nimterop/all.nim2
-rw-r--r--nimterop/build.nim8
-rw-r--r--nimterop/cimport.nim2
-rw-r--r--nimterop/docs.nim28
-rw-r--r--nimterop/getters.nim4
-rw-r--r--nimterop/toast.nim2
-rw-r--r--nimterop/types.nim25
-rw-r--r--tests/tsoloud.nim2
11 files changed, 29 insertions, 52 deletions
diff --git a/.travis.yml b/.travis.yml
index 359d07b..d16b9fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,13 +11,13 @@ language: c
env:
- BRANCH=0.20.2
- - BRANCH=1.0.4
+ - BRANCH=1.0.6
- BRANCH=devel
cache:
directories:
- "$HOME/.choosenim/toolchains/nim-0.20.2"
- - "$HOME/.choosenim/toolchains/nim-1.0.4"
+ - "$HOME/.choosenim/toolchains/nim-1.0.6"
install:
- export CHOOSENIM_CHOOSE_VERSION=$BRANCH
diff --git a/appveyor.yml b/appveyor.yml
index 5651948..5275844 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,7 +10,7 @@ matrix:
environment:
matrix:
- NIM_VERSION: 0.20.2
- - NIM_VERSION: 1.0.4
+ - NIM_VERSION: 1.0.6
for:
-
diff --git a/nimterop.nimble b/nimterop.nimble
index 37637f5..24bbb4f 100644
--- a/nimterop.nimble
+++ b/nimterop.nimble
@@ -12,7 +12,7 @@ installDirs = @["nimterop"]
installFiles = @["config.nims"]
# Dependencies
-requires "nim >= 0.19.6", "regex >= 0.13.0", "cligen >= 0.9.41"
+requires "nim >= 0.20.2", "regex >= 0.13.1", "cligen >= 0.9.43"
import nimterop/docs
diff --git a/nimterop/all.nim b/nimterop/all.nim
index c024d01..dc22967 100644
--- a/nimterop/all.nim
+++ b/nimterop/all.nim
@@ -4,4 +4,4 @@ Module that should import everything so that `nim doc --project nimtero/all` run
# TODO: make sure it does import everything.
-import "."/[cimport, build, types, plugin, compat]
+import "."/[cimport, build, types, plugin]
diff --git a/nimterop/build.nim b/nimterop/build.nim
index 4b061cc..7939afa 100644
--- a/nimterop/build.nim
+++ b/nimterop/build.nim
@@ -2,8 +2,6 @@ import hashes, macros, osproc, sets, strformat, strutils, tables
import os except findExe, sleep
-import "."/[compat]
-
proc sanitizePath*(path: string, noQuote = false, sep = $DirSep): string =
result = path.multiReplace([("\\\\", sep), ("\\", sep), ("/", sep)])
if not noQuote:
@@ -648,7 +646,7 @@ proc getGccPaths*(mode = "c"): seq[string] =
break
if inc:
var
- path = line.strip().myNormalizedPath()
+ path = line.strip().normalizedPath()
if path notin result:
result.add path
@@ -667,13 +665,13 @@ proc getGccLibPaths*(mode = "c"): seq[string] =
if "LIBRARY_PATH=" in line:
for path in line[13 .. ^1].split(PathSep):
var
- path = path.strip().myNormalizedPath()
+ path = path.strip().normalizedPath()
if path notin result:
result.add path
break
elif '\t' in line:
var
- path = line.strip().myNormalizedPath()
+ path = line.strip().normalizedPath()
if path notin result:
result.add path
diff --git a/nimterop/cimport.nim b/nimterop/cimport.nim
index 4c63c31..84f7b4f 100644
--- a/nimterop/cimport.nim
+++ b/nimterop/cimport.nim
@@ -21,7 +21,7 @@ const CIMPORT {.used.} = 1
include "."/globals
-import "."/[build, compat, paths, types]
+import "."/[build, paths, types]
export types
proc interpPath(dir: string): string=
diff --git a/nimterop/docs.nim b/nimterop/docs.nim
index 17089ec..a194086 100644
--- a/nimterop/docs.nim
+++ b/nimterop/docs.nim
@@ -1,22 +1,18 @@
import macros, strformat
-when (NimMajor, NimMinor, NimPatch) >= (0, 19, 9):
- from os import parentDir, getCurrentCompilerExe, DirSep
- proc getNimRootDir(): string =
- #[
- hack, but works
- alternatively (but more complex), use (from a nim file, not nims otherwise
- you get Error: ambiguous call; both system.fileExists):
- import "$nim/testament/lib/stdtest/specialpaths.nim"
- nimRootDir
- ]#
- fmt"{currentSourcePath}".parentDir.parentDir.parentDir
-else:
- proc getCurrentCompilerExe*(): string =
- "nim"
+from os import parentDir, getCurrentCompilerExe, DirSep
+proc getNimRootDir(): string =
+ #[
+ hack, but works
+ alternatively (but more complex), use (from a nim file, not nims otherwise
+ you get Error: ambiguous call; both system.fileExists):
+ import "$nim/testament/lib/stdtest/specialpaths.nim"
+ nimRootDir
+ ]#
+ fmt"{currentSourcePath}".parentDir.parentDir.parentDir
- const
- DirSep = when defined(windows): '\\' else: '/'
+const
+ DirSep = when defined(windows): '\\' else: '/'
proc execAction(cmd: string): string =
var
diff --git a/nimterop/getters.nim b/nimterop/getters.nim
index 885ce2f..3d77e99 100644
--- a/nimterop/getters.nim
+++ b/nimterop/getters.nim
@@ -2,7 +2,7 @@ import dynlib, macros, os, sequtils, sets, strformat, strutils, tables, times
import regex
-import "."/[build, compat, globals, plugin, treesitter/api]
+import "."/[build, globals, plugin, treesitter/api]
const gReserved = """
addr and as asm
@@ -505,6 +505,6 @@ proc loadPlugin*(gState: State, sourcePath: string) =
proc expandSymlinkAbs*(path: string): string =
try:
- result = path.expandSymlink().absolutePath(path.parentDir()).myNormalizedPath()
+ result = path.expandSymlink().absolutePath(path.parentDir()).normalizedPath()
except:
result = path
diff --git a/nimterop/toast.nim b/nimterop/toast.nim
index 40cc704..7dda1dc 100644
--- a/nimterop/toast.nim
+++ b/nimterop/toast.nim
@@ -2,7 +2,7 @@ import os, osproc, strformat, strutils, times
import "."/treesitter/[api, c, cpp]
-import "."/[ast, compat, globals, getters, grammar]
+import "."/[ast, globals, getters, grammar]
proc printLisp(gState: State, root: TSNode) =
var
diff --git a/nimterop/types.nim b/nimterop/types.nim
index a57252f..5209e7a 100644
--- a/nimterop/types.nim
+++ b/nimterop/types.nim
@@ -1,26 +1,9 @@
# see https://github.com/nimterop/nimterop/issues/79
-when (NimMajor, NimMinor, NimPatch) < (0, 19, 9):
- # clean this up once upgraded; adapted from std/time_t
- when defined(nimdoc):
- type
- impl = distinct int64
- Time = impl
- elif defined(windows):
- when defined(i386) and defined(gcc):
- type Time {.importc: "time_t", header: "<time.h>".} = distinct int32
- else:
- type Time {.importc: "time_t", header: "<time.h>".} = distinct int64
- elif defined(posix):
- import posix
- type
- time_t* = Time
- time64_t* = Time
-else:
- import std/time_t as time_t_temp
- type
- time_t* = time_t_temp.Time
- time64_t* = time_t_temp.Time
+import std/time_t as time_t_temp
+type
+ time_t* = time_t_temp.Time
+ time64_t* = time_t_temp.Time
when defined(cpp):
# http://www.cplusplus.com/reference/cwchar/wchar_t/
diff --git a/tests/tsoloud.nim b/tests/tsoloud.nim
index 9281236..90cf82d 100644
--- a/tests/tsoloud.nim
+++ b/tests/tsoloud.nim
@@ -39,7 +39,7 @@ else:
cCompile(src/"c_api/soloud_c.cpp")
cCompile(src/"core/*.cpp")
-cCompile(src/"audiosource", "cpp")
+cCompile(src/"audiosource", "cpp", exclude="ay/")
cCompile(src/"audiosource", "c")
cCompile(src/"filter/*.cpp")