Skip to content

Fix build with AS_NO_COMPILER#80

Open
MarcroSoft wants to merge 1 commit into
anjo76:masterfrom
MarcroSoft:fix-as-no-compiler-build
Open

Fix build with AS_NO_COMPILER#80
MarcroSoft wants to merge 1 commit into
anjo76:masterfrom
MarcroSoft:fix-as-no-compiler-build

Conversation

@MarcroSoft

Copy link
Copy Markdown

Since the introduction of the known-types cache, building with AS_NO_COMPILER defined fails:

as_builder.cpp(90): error C2065: 'hasCachedKnownTypes': undeclared identifier

hasCachedKnownTypes is declared inside the #ifndef AS_NO_COMPILER block in as_builder.h, but the asCBuilder constructor initializes it unconditionally. This guards the initialization the same way as the one in asCBuilder::Reset().

Verified that the library builds cleanly with AS_NO_COMPILER on MSVC 19.44 after this change, and that bytecode loaded into the resulting runtime executes correctly.

🤖 Generated with Claude Code

hasCachedKnownTypes is declared inside the #ifndef AS_NO_COMPILER block
in as_builder.h but was initialized unconditionally in the asCBuilder
constructor, causing a compile error (C2065 on MSVC) when building with
AS_NO_COMPILER defined. Guard the initialization like the one in
asCBuilder::Reset().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecat

codecat commented Jul 16, 2026

Copy link
Copy Markdown

And so we have our first generative AI PR. I really hope this is something we can reject in Angelscript. 😔

(It's worth noting: if this gets merged, the repository will be tainted with a "Claude has contributed to this" forever; I don't think that's reversible. The change is simple enough; if this is an acceptable change, it should be committed manually, as a new commit, without this PR.)

@day-garwood

Copy link
Copy Markdown

And so we have our first generative AI PR. I really hope this is something we can reject in Angelscript. 😔

That's up to Andreas of course, but for what it's worth my opinion is that we shouldn't reject something just because it's AI. Whether we like it or not the monster has been unleashed and so we need to learn to treat it as a tool that can be used or misused like any other.

The question is whether what it has generated has value. If it doesn't work at all, reject. If it does but is not architecturally advisable then it needs review. If the whole thing is sound then there's little sense in rejecting it solely on principle and forcing someone to rewrite and resubmit the PR by hand simply because we don't want AI contributions.

On the other hand, I do agree that it may well be time to put out an AI policy saying exactly what is or isn't allowed. AI has opened up programming to a lot of people who don't have a clue what they're doing, and while I believe we should be welcoming and patient with beginners I also think that, at least right now, it is far too easy to break something unintentionally if you don't understand what changes the AI has made.

I have seen surprisingly good output by AI. I have also seen ridiculously poor output. So both need to be taken seriously.

Just my thoughts. At the end of the day Andreas has the final say either way.

@anjo76 anjo76 self-assigned this Jul 16, 2026
@anjo76 anjo76 added the bug Something isn't working label Jul 16, 2026
@anjo76

anjo76 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

@codecat I never blindly merge a PR without doing my own review and tests on it. I do commit the PRs as I think it is a nice way of giving credit to the author, but most of the time I do my own refactoring of the submitted code as a second commit to suite my own taste.

If you hadn't mentioned it I most likely wouldn't even have given it must thought that this PR was generated by Claude Code.

I agree with @day-garwood though. AI is here to stay. We need to learn to live with it and cannot just blindly reject anything that is AI generated. As long as the generated code is properly reviewed and tested I see no harm in it being AI generated.

@codecat

codecat commented Jul 16, 2026

Copy link
Copy Markdown

As a decade+ long Angelscript user, supporter, and contributor, it's disappointing to hear that for many different reasons.

My vote (which I know does not hold much weight, it's your project after all) is to fully reject generative AI, and I would like to see a contributor policy mirroring this.

I don't particularly enjoy holding long discussions about this stuff anymore for the sake of my mental health, so I'm not gonna go in-depth myself, but I urge you to read into some of the ethical, moral, and environmental problems of LLMs (see link above) and understand where people like me are coming from.

@anjo76

anjo76 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

I'll do that. Thanks for sharing the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants