SpaceManiac / SpacemanDMM

A BYOND language smartness provider, map renderer, and more.
https://marketplace.visualstudio.com/items?itemName=platymuus.dm-langclient
GNU General Public License v3.0
83 stars 83 forks source link

515 compatibility #341

Closed Mothblocks closed 1 year ago

Mothblocks commented 2 years ago

http://www.byond.com/forum/post/2828780

SpaceManiac commented 2 years ago

Release notes with non-explicitly-breaking features: http://www.byond.com/docs/notes/515.html

Will likely only get to this after 515 has stewed in beta for a bit and codebases like /tg/ are actually looking to start using it.

Mothblocks commented 2 years ago

It's gonna be a bit before we can because it breaks tgui but I'll keep you in the loop

Mothblocks commented 2 years ago

oh yeah pointers are a thing now too lol

Spookerton commented 1 year ago

basic builtins.rs adds at 1597

proc/ceil(A);
proc/floor(A);
proc/fract(A);
proc/ftime(File, IsCreationTime);
proc/get_steps_to(Ref, Trg, Min=0);
proc/isinf(A);
proc/isnan(A);
proc/ispointer(A);
proc/nameof(V);
proc/noise_hash(hash_name, num1, num2, num3 /*, ...*/);
proc/refcount(Object);
proc/trimtext(Text);
proc/trunc(A);

client/proc/RenderIcon(object);

list/proc/RemoveAll(Item1, Item2/*, ...*/);

ANIMATION_SLICE = Int(8);
ANIMATION_CONTINUE = Int(512);

JSON_PRETTY_PRINT = Int(1);
JSON_STRICT = Int(1);
JSON_ALLOW_COMMENTS = Int(2);

not sure on call_ext because of the second params scope

Mothblocks commented 1 year ago

515 also adds __TYPE__ and __PROC__.

Spookerton commented 1 year ago

also adds the /final/ var sugar. https://www.byond.com/docs/ref/#/var/final

Mothblocks commented 1 year ago

Also adds /proc/bla() as type, which is equivalent to RETURN_TYPE in SDMM.

Mothblocks commented 1 year ago

Will likely only get to this after 515 has stewed in beta for a bit and codebases like /tg/ are actually looking to start using it.

@SpaceManiac It's been about 6 months and we're about to require 515 for building.

The two biggest failures right now are no nameof and no savefile/byond_version.

Mothblocks commented 1 year ago

So we need:

Those last two are important because I can't just define over those

willox commented 1 year ago

Trying to collate all that...

Mothblocks commented 1 year ago

I'm wrong about :, it was SDMM incorrectly reporting :: and I got confused

Zandario commented 1 year ago

also adds the /final/ var sugar. byond.com/docs/ref/#/var/final

/final/ is also used for procs, it should probably be reserved to prevent people for accidentally finding out the hard way

VSC Example ![image](https://user-images.githubusercontent.com/34761877/234431706-8a5584fc-8411-4f39-85a2-829516a2bd5c.png)
Dream Maker Example ![image](https://user-images.githubusercontent.com/34761877/234432334-d294ee72-9625-44d4-a892-631db32b3475.png)
Spookerton commented 1 year ago

Recent attack mitigation stuff in late 515 won't be backported to stable. Much of this can be hidden with a version file at the moment, but the :: accessor and & pointer syntax are unavoidable.

Spookerton commented 1 year ago

https://github.com/SpaceManiac/SpacemanDMM/pull/353 handled call_ext 240d8e02c41e7f8f3f7479354e0dcca362ec511e handled :: scope token (partially? /foo::bar() cries) 41297597fb29a565375106189309426b8ef2c3a9 handled /final/ sugar 32bf1b3b98c3e81e576300ec32bfe357813e4bae handled & and * pointer stuff

https://github.com/SpaceManiac/SpacemanDMM/pull/354 does simple constants and proc signatures, op lists remaining things afaik having gone through the ref for byondver=515 hits

LemonInTheDark commented 1 year ago

To add onto willox's post, we'll need __IMPLIED_TYPE__ support, see https://www.byond.com/docs/ref/#/DM/preprocessor/__IMPLIED_TYPE__ Shouldn't be hard, just need to tell the parser that it exists and it can be ANYTHING (insert rainbow wave)

LemonInTheDark commented 1 year ago

@SpaceManiac are we free or is there more to do

SpaceManiac commented 1 year ago

/tg/station now passes dreamchecker in 515 mode. Sure to be bugs or something missed along the way but I think that's the majority of it.

LemonInTheDark commented 1 year ago

aight ws, sounds great

SpaceManiac commented 1 year ago

Closing this since 515 support was released in suite 1.8. Any bugs should now be their own tickets, example: