set nwn_script_comp as default compiler #113
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit sets
nwn_script_comp
as the default compiler and reuses the configuration optionsnssCompiler
andnssFlags
.nwn_script_comp
output is read through peg and modified to appear nasher-organic.Went a few different directions on this integration, so would appreciate feedback on the current incarnation. I've been away from nim for about six months, so I'm sure it can be written more efficiently. Flame awy.
I'd like to add a feature where the user can specify
nssCompiler
andnssFlags
per target, or for a way to switch within the package. As I tested the various errors thatnwn_script_comp
provides, although generally much better thannwnsc
, there are some that are much less informative. It would be handy to have a target that compiles withnwnsc
when running into those specific errors wherenwnsc
would be a better compiler. Currently this is not possible as config opts are not overwritten by user-defined flags, but I'll look into it.getFlags
, though compiler-specific, was left incompile.nim
instead ofcompiler.nim
due to the requirement foropts
andtarget
, which cannot be included incompiler.nim
without circular reference.I've tested this against small module builds, single file compilation and various nasher commands, and it seems to work correctly. If you have
nssCompiler
andnssFlags
set fornwnsc
,nasher
will not default tonwn_script_comp
until you unset those options or resetnssCompiler
to../nwn_script_comp[.exe]
. ThenssFlags
can be unset completely to allow nasher to build the option line, or can be set withflags
per-target. Only tested on windows.Documentation changes are still a WIP.