Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set nwn_script_comp as default compiler #113

Closed
wants to merge 2 commits into from

Conversation

tinygiant98
Copy link
Contributor

This commit sets nwn_script_comp as the default compiler and reuses the configuration options nssCompiler and nssFlags. 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 and nssFlags per target, or for a way to switch within the package. As I tested the various errors that nwn_script_comp provides, although generally much better than nwnsc, there are some that are much less informative. It would be handy to have a target that compiles with nwnsc when running into those specific errors where nwnsc 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 in compile.nim instead of compiler.nim due to the requirement for opts and target, which cannot be included in compiler.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 and nssFlags set for nwnsc, nasher will not default to nwn_script_comp until you unset those options or reset nssCompiler to ../nwn_script_comp[.exe]. The nssFlags can be unset completely to allow nasher to build the option line, or can be set with flags per-target. Only tested on windows.

Documentation changes are still a WIP.

This commit sets `nwn_script_comp` as the default compiler and reuses the configuration options `nssCompiler` and `nssFlags`.  `nwn_script_comp` output is read through peg and modified to appear nasher-organic.
@squattingmonk
Copy link
Owner

Merged manually in 1cb7993 due to conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants