Skip to content

Commit

Permalink
Add building of debug version
Browse files Browse the repository at this point in the history
  • Loading branch information
PMunch committed Jan 2, 2023
1 parent a6f1255 commit bba60b7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nimlsp.nimble
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Package

version = "0.4.3"
version = "0.4.4"
author = "PMunch"
description = "Nim Language Server Protocol - nimlsp implements the Language Server Protocol"
license = "MIT"
srcDir = "src"
bin = @["nimlsp"]
bin = @["nimlsp", "nimlsp_debug"]

# Dependencies

Expand Down
2 changes: 2 additions & 0 deletions src/nimlsp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ if paramCount() == 1:
quit 0
of "--version":
echo "nimlsp v", version
when defined(debugLogging): echo "Compiled with debug logging"
when defined(debugCommunication): echo "Compiled with communication logging"
quit 0
else: nimpath = expandFilename(paramStr(1))
if not fileExists(nimpath / "config/nim.cfg"):
Expand Down
1 change: 1 addition & 0 deletions src/nimlsp_debug.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include nimlsp
23 changes: 23 additions & 0 deletions src/nimlsp_debug.nim.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gc:markAndSweep

hint[XDeclaredButNotUsed]:off

path:"$lib/packages/docutils"

define:useStdoutAsStdmsg
define:nimsuggest
define:nimcore
define:debugCommunication
define:debugLogging

# die when nimsuggest uses more than 4GB:
@if cpu32:
define:"nimMaxHeap=2000"
@else:
define:"nimMaxHeap=4000"
@end

--threads:on
--warning[Spacing]:off # The JSON schema macro uses a syntax similar to TypeScript
--warning[CaseTransition]:off
-d:nimOldCaseObjects

0 comments on commit bba60b7

Please sign in to comment.