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

Make naming of name attribute consistent between vs gen and ambuild gen #167

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

psychonic
Copy link
Member

Fixes the below issue when using vs gen with current SourceMod code

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\prep.py", line 156, in Configure
    if not cm.generate(options.generator):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\context_manager.py", line 93, in generate
    self.parseBuildScripts()
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context_manager.py", line 50, in parseBuildScripts
    self.execContext(cx)
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context_manager.py", line 148, in execContext
    exec(code, scriptGlobals)
  File "G:\sm\sourcemod\AMBuildScript", line 590, in <module>
    builder.Build('public/safetyhook/AMBuilder', {'SafetyHook': SafetyHook })
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context.py", line 160, in Build
    return self.cm.runBuildScript(self, path, vars or {})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context_manager.py", line 68, in runBuildScript
    return self.runBuildScriptImpl(context, path, vars or {})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context_manager.py", line 119, in runBuildScriptImpl
    scriptGlobals = self.execContext(cx)
                    ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\ambuild2\frontend\v2_2\context_manager.py", line 148, in execContext
    exec(code, scriptGlobals)
  File "G:\sm\sourcemod\public/safetyhook\AMBuilder", line 25, in <module>
    binary = libsafetyhook.Configure(compiler, libsafetyhook.name, 'Release - {0}'.format(compiler.target.arch))
                                               ^^^^^^^^^^^^^^^^^^
AttributeError: 'Project' object has no attribute 'name'. Did you mean: 'name_'?
Configure failed: 'Project' object has no attribute 'name'

between vs gen and ambuild gen
@psychonic psychonic merged commit d678cd1 into master Jun 15, 2024
2 of 5 checks passed
@psychonic psychonic deleted the psy/vsgen-name-fix branch June 15, 2024 16:16
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.

1 participant