Skip to content

Commit

Permalink
Remove nimsuggest elision
Browse files Browse the repository at this point in the history
  • Loading branch information
Nycto committed Feb 16, 2024
1 parent c01fa26 commit 4eb56a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@ jobs:
- name: Build
run: cd project && nimble build -y

nimsuggest:
## Confirm all the tests compile when running via nimsuggest. There are some optimizations in place
## to improve compile times in this case.
runs-on: ubuntu-latest
container: nimlang/choosenim
strategy:
matrix:
nim: [ 2.0.0, 1.6.14 ]
steps:
- uses: actions/checkout@v1
- name: Choose Nim
run: choosenim update -y ${{ matrix.nim }}
- name: Safe git directory
run: git config --global --add safe.directory "$(pwd)"
- name: Test
run: find tests -name "t_*.nim" | xargs -n1 sh -c 'nim c -d:nimsuggest $0 || exit 255'

profile:
## Confirm the tests are able to run in profiling mode
runs-on: ubuntu-latest
Expand Down
18 changes: 6 additions & 12 deletions src/necsus.nim
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ proc buildApp(

let parsedApp = parseApp(pragmaProc, runner)

let codeGenInfo = when not defined(nimsuggest):
newCodeGenInfo(conf, parsedApp, parseSystemList(systems))
else:
newEmptyCodeGenInfo(conf, parsedApp)
let codeGenInfo = newCodeGenInfo(conf, parsedApp, parseSystemList(systems))

result = newStmtList(
codeGenInfo.archetypeEnum.codeGen,
Expand All @@ -58,14 +55,11 @@ proc buildApp(
pragmaProc
)

pragmaProc.body = when not defined(nimsuggest):
newStmtList(
codeGenInfo.createAppStateInstance(),
codeGenInfo.createTickRunner(runner),
codeGenInfo.createAppReturn(pragmaProc),
)
else:
newStmtList()
pragmaProc.body = newStmtList(
codeGenInfo.createAppStateInstance(),
codeGenInfo.createTickRunner(runner),
codeGenInfo.createAppReturn(pragmaProc),
)

when defined(dump):
echo "import necsus/runtime/[world, archetypeStore], std/math, necsus/util/profile"
Expand Down

0 comments on commit 4eb56a3

Please sign in to comment.