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

PPJ support and pre-scan namespace resolution #27

Merged
merged 22 commits into from
Jun 13, 2024

Conversation

nikitalita
Copy link
Collaborator

@nikitalita nikitalita commented Oct 14, 2023

This implements PPJ support and pre-scanning non-PCompiler/PPJ input files for namespace resolution.

So basically, we have two different namespace resolution schemes:

"""classic""" mode:

  • applies to inputs from PPJ, or if we're in PCompiler compatibility mode
  • input files can be absolute or relative to any of the import directories
  • namespaces are determined by the relative basedir from the input file to the import directory
  • so "C:/Scripts/autoloot/fragments/terminals/something.psc" and an import directory of "C:/Scripts" ends up with an object name of "autoloot:fragments:terminals:something"

Modern mode:

  • applies to all other inputs
  • input files are either absolute or relative to the CWD
  • the files are pre-scanned for their proper object names.

We probably want to do a refactor on the compiler nodes to have it split into two separate things; a Read/pre-parse node and everything else, since the input params for the nodes get modified after the namespace has been resolved

@nikitalita
Copy link
Collaborator Author

We probably want to remove the cwd from the default imports if we’re in modern mode; there’s no longer a need for it and it can lead to unexpected behavior.

@nikitalita nikitalita marked this pull request as draft October 14, 2023 22:20
@qudix
Copy link

qudix commented Jun 8, 2024

Anyone still alive? /s

@Gamerooni
Copy link

hey @nikitalita, this PR is marked as draft but @Orvid has approved it. Does that mean that this code is all good to merge?

I really like this feature and I'd like to use your fork, but I do want to make sure that I won't run into any catastrophic issues on the way.

@nikitalita nikitalita marked this pull request as ready for review June 13, 2024 01:57
@nikitalita nikitalita merged commit 588a6dc into Orvid:master Jun 13, 2024
2 checks passed
@Gamerooni
Copy link

Thank you so much!

@Gamerooni
Copy link

this might solve the build issue:
microsoft/vcpkg#38980 (comment)

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.

4 participants