sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

Value.Int should work with int32 #287

Open pravic opened 3 years ago

pravic commented 3 years ago

This applies to:

fixes #286

cc @AshfordN

pravic commented 3 years ago

That was intense.

pravic commented 3 years ago

@AshfordN Do you have any idea why it fails in AppVeyor?

https://github.com/sciter-sdk/go-sciter/blob/73bd385adcb84c3ba4e72654e93e3b197cc5da5b/examples/handlers/handlers.go#L28-L31

invalid operation: sum += args[i].Int() (mismatched types int32 and int)

AshfordN commented 3 years ago

Based on my tests, this is caused by trying to build the example(s) in this (value-int32) branch while linking against the current master branch. Now I'm not at all experienced with AppVeyor, but right around line 99 of the output, just before the examples are built, it seems as though the service is pulling in go-sciter from the master branch. Keep in mind that this PR introduces breaking changes.

pravic commented 3 years ago

it seems as though the service is pulling in go-sciter from the master branch.

Apparently, so.

Keep in mind that this PR introduces breaking changes.

Yeah. I wonder whether we should introduce versioning finally.

AshfordN commented 3 years ago

Yeah. I wonder whether we should introduce versioning finally.

I think it makes sense, especially since this touches, what I consider to be, a core part of the package. This is likely to affect a lot of code bases.

AshfordN commented 3 years ago

What is the status of the PR? As far as I see, this is a working branch. The only thing left to do, is to introduce versioning to avoid conflicts with existing code bases. Additionally, since versioning is now required starting with Go 1.16, I think now is a good time to implement it going forward.

pravic commented 3 years ago

The only thing left to do, is to introduce versioning to avoid conflicts with existing code bases.

Yep, this. Would you consider filing a PR for versioning?

AshfordN commented 3 years ago

No problem. I'll address it as soon as I can.