Author Topic: Squirrel 3.1 and new bindings  (Read 1767 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #15 on: April 25, 2021, 06:08:34 am »
After manually creating "sdk_tests" sub folder these results on the third run.

Tim S.

Code
======= Test SDK function END ======= 

Global executed tests: 519
Global passed tests:   498
Global failed tests:   21
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #16 on: April 25, 2021, 06:16:54 am »
Code
======= Test helpers BEGINN ======= 
Test: MakePath 0....................PASSED
[ERROR] Test: MakePath 1....................FAILED
[ERROR] got:    "path\name"
[ERROR] needed: "path/name "
[ERROR] Test: MakePath 2....................FAILED
[ERROR] got:    "path/\name"
[ERROR] needed: "path/name "
[ERROR] Test: MakeDir 0.....................FAILED
[ERROR] got:    "name\"
[ERROR] needed: "name/ "
[ERROR] Test: MakeDir 1.....................FAILED
[ERROR] got:    "name/\"
[ERROR] needed: "name/ "
[ERROR] Test: MakeDir 2.....................FAILED
[ERROR] got:    "path\name/\"
[ERROR] needed: "path/name/ "
[ERROR] Test: MakeDir 3.....................FAILED
[ERROR] got:    "path/\name/\"
[ERROR] needed: "path/name/ "

Executed tests: 7
passed tests:   1
failed tests:   6
======= Test helpers END =======

Code
[ERROR] Test: CompileTargetBase::GetOutputFilename......................................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "
[ERROR] Test: CompileTargetBase::SuggestOutputFilename..................................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "
[ERROR] Test: CompileTargetBase::SetOutputFilename......................................FAILED
[ERROR] got:    "debugOutput.exe"
[ERROR] needed: "debugOutput "
[ERROR] Test: CompileTargetBase::SuggestOutputFilename after set........................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "

Code
[ERROR] Test: CompileTargetBase::GetExecutableFilename..................................FAILED
[ERROR] got:    "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject.exe"
[ERROR] needed: "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject "
[ERROR] Test: CompileTargetBase::GetDynamicLibFilename..................................FAILED
[ERROR] got:    "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject.exe"
[ERROR] needed: "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject "

Code
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17

Code
[ERROR] Test: cbProject::ExtensionListNodes root after 2....FAILED
[ERROR] got:    "//rootNode[0]"
[ERROR] needed: "/rootNode[0] "
[ERROR] Test: cbProject::ExtensionListNodes after addition..FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1];rootNode[0]/multi[2]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0];rootNode[0]/multi[1] "

Code
[ERROR] Test: cbProject::ExtensionRemoveNode multi 1....................FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0] "

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5339
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Squirrel 3.1 and new bindings
« Reply #17 on: April 25, 2021, 06:22:58 am »
Code
From fcd586699f2330ee51d684945031252d7122c378 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Sat, 24 Apr 2021 11:47:24 -0400
Subject: Add define of EXPORT_LIB to Squirrel target

---
 src/CodeBlocks_wx31.cbp    | 1 +
 src/CodeBlocks_wx31_64.cbp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/CodeBlocks_wx31.cbp b/src/CodeBlocks_wx31.cbp
index adfafe2aa..0652f4cf4 100644
--- a/src/CodeBlocks_wx31.cbp
+++ b/src/CodeBlocks_wx31.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
diff --git a/src/CodeBlocks_wx31_64.cbp b/src/CodeBlocks_wx31_64.cbp
index 16c775c76..6d31ed7d5 100644
--- a/src/CodeBlocks_wx31_64.cbp
+++ b/src/CodeBlocks_wx31_64.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
--
2.31.1.windows.1


Updated the patch file; I have only tested the 64 bit project and it builds without error.
I have yet to run the built binaries.

Tim S.

Hi, Tim, thanks, you patch fixes the build error on my 64bit Windows. I don't have 32bit GCC system right now.
And I see that I got the same test results as posted by you.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #18 on: April 25, 2021, 05:44:42 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp

Code
static_assert(sizeof(int64_t)==sizeof(SQInteger), "Incorrect setup of Squirrel!");

Tim S.

« Last Edit: April 25, 2021, 05:58:42 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13196
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #19 on: April 25, 2021, 06:00:08 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp
What do you use to build project files or autotools?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13196
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #20 on: April 25, 2021, 06:06:37 pm »
In fact it should work fine if we change the comparison to >=. This is there to make sure that int64_t could take SQInteger values without loss of precision.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #21 on: April 25, 2021, 10:11:18 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp
What do you use to build project files or autotools?

CB Projects and MSys2 GCC.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7092
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #22 on: April 26, 2021, 01:53:23 am »
In fact it should work fine if we change the comparison to >=. This is there to make sure that int64_t could take SQInteger values without loss of precision.

Doing that did result in the core CB project building.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13196
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #23 on: May 04, 2021, 07:29:12 pm »
I've pushed a new commit and the tests should behave the same as on linux (as much as it is possible).

Have anyone tried any wizard? Are there any problems to report?
I'm nearing completion of this feature and I'll push it to svn in the next weeks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2947
Re: Squirrel 3.1 and new bindings
« Reply #24 on: May 05, 2021, 01:00:23 am »
Nice work, could compile it right away on windows.

failed tests:
Code
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17

[ERROR] Test: cbProject::ExtensionListNodes root after 2....FAILED
[ERROR] got:    "//rootNode[0]"
[ERROR] needed: "/rootNode[0] "
[ERROR] Test: cbProject::ExtensionListNodes after addition..FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1];rootNode[0]/multi[2]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0];rootNode[0]/multi[1] "
[ERROR] Test: cbProject::ExtensionRemoveNode multi 1....................FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0] "

Also the "Allow this script for this session" permission is not working, it keeps asking for permissions (probably old bug)

I only use wxWidgets wizard and console project wizard, and both seem to work

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13196
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #25 on: May 05, 2021, 10:28:38 pm »
Thanks for testing. So next week would be push time...

The failures are expected and are bugs in the API. I'll take a look at some of them soon.
The permission/sandbox/access system is also totally broken and what you see is totally normal unfortunately. At the moment I don't intend to fix it, I've looked at this and I don't have the time required to untangle it. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]