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

Update improved type analysis to develop #216

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

Tacodiva
Copy link

Supersedes #160

I still want to do this but last time I got so bogged down by trying to preserve the git history that I stopped working on it. I've decided to just merge the whole thing into one commit so I can stop thinking about git and actually have fun working on this again.

At the time of me opening this PR it passes all the tests but I or someone still needs to go through and lint it because eslint has a lot of complaints. The type analysis itself can still be improved, but I'm happy with where this is at.

I can't merge into "next" because of the aforementioned git problems.

@yuri-kiss
Copy link

Monumental task, Gl and i like the look of it 👋

@GarboMuffin
Copy link
Member

GarboMuffin commented Jun 16, 2024

The snapshot tests are falling back to naming every compiled script just "script" instead of the procedure variant/code here

const generatedJS = [];
JSGenerator.testingApparatus = {
report: (jsgen, factorySource) => {
const targetName = jsgen.target.getName();
const scriptName = jsgen.script.procedureVariant || 'script';
const js = normalizeJS(factorySource);
generatedJS.push(`// ${targetName} ${scriptName}\n${js}`);
}
};

@GarboMuffin
Copy link
Member

GarboMuffin commented Jun 24, 2024

I will get this on an experiment tonight and get some people to help with testing

@GarboMuffin
Copy link
Member

https://experiments.turbowarp.org/next/ this is updated now if anyone wants to help us find regressions

@Tacodiva
Copy link
Author

I found a project that wasn't working and have fixed the issue and added tests for it

@GarboMuffin
Copy link
Member

GarboMuffin commented Jun 25, 2024

https://experiments.turbowarp.org/next/ should be up-to-date again

@GarboMuffin
Copy link
Member

GarboMuffin commented Jul 1, 2024

I accidentally put this in production last night and got a few (very useless) bug reports very quickly before rolling back

image

@Jazza-231
Copy link

Jazza-231 commented Jul 1, 2024

2024-07-01.21-27-53.mp4

https://turbowarp.org/780631097?interpolate&offscreen

Compiler causes different behaviour, in the menu FX sprite, I suspect It is to do with the touching colour block.

Update: Yes, it is, the list usage and normal usage of the touching colour block both do not work.

@Tacodiva
Copy link
Author

Tacodiva commented Jul 3, 2024

I've fixed the issues with the touching color and color touching color blocks, as well as an issue where switching to a costume with a number name (like switch costume to "1") would switch to costume number 1 instead of the costume named "1". I feel like I should add a test for at least this second one but I'm not sure if I should create a new execute test or add it to an existing one.

@FurryR
Copy link

FurryR commented Jul 20, 2024

vm.exports.i_will_not_ask_for_help_when_these_break().ScriptTreeGenerator seems not working, I hope it can be fixed soon.

@yuri-kiss
Copy link

vm.exports.i_will_not_ask_for_help_when_these_break().ScriptTreeGenerator seems not working, I hope it can be fixed soon.

The exports are not in this version, and btw it does say not to ask for help so keep that in mind 👍 , regardless I do hope exports are added for this as-well, or if you guys are up to it a basic compiler API for extensions :P

@Tacodiva
Copy link
Author

Tacodiva commented Jul 28, 2024

Sorry, those exports being missing was due to a mistake, I should have fixed that up now (though note that their usage may be different to mainline). I've also exposed some of the new classes used in the IR as it may be helpful to have access to their constructors. I have also exposed the new enums being used throughout the IR. Garbo will need to make the final decision on this though.

@yuri-kiss
Copy link

yuri-kiss commented Aug 2, 2024

With the exports I have made working patches already, This is great, thanks so much lol, also I like how its more type based it helps a lot. (video link tw disc: https://discord.com/channels/837024174865776680/1098474682543509514/1269046708332134471)

@CubesterYT
Copy link

What's the status of this PR so far? I'd like to know, since this is a great update to TurboWarp.

@Tacodiva
Copy link
Author

I've just merged develop into this again so, it's ready to go again. Not sure when garbo would consider merging this, I suppose it will be down to when he feels it has been sufficiently tested and he has time to review the code.

@yuri-kiss
Copy link

yuri-kiss commented Sep 26, 2024 via email

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.

6 participants