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

Drop remaining references to "QScriptEngineDebugger". #1206

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

odysseus654
Copy link
Contributor

This PR drops all remaining references to QScriptEngineDebugger.

It appears that this used to be available by holding down [Shift] while launching Vircadia but this feature was disabled due to launching deadlocks. This appears to currently still be available by sticking #debug at the end of a scripting URL.

I have verified that this compiles and links but have not attempted to run or verify that scripts are running properly.

@odysseus654
Copy link
Contributor Author

My biggest reason for opening up this PR is to try to figure out what to do with this (Something that has both UI impact and is QtScript-specific). I can either drop it from the build or try to find some way of stretching this code across the proxy interface. I have options here, but I don't have to worry about making it work if it's been deleted from the system.

That and also because this is a potentially visible change that can be tested independently of the other code shifting I've been doing.

@daleglass
Copy link
Contributor

Mm. So I've thought about it. I think while we could indeed merge this, it would be ideal not to. Debugging is important, and in fact I've been trying to extend it with #1156.

I can let that one go, but still, my view is that any cool functionality a scripting engine can provide that can be helpful for either the user or the developer is a very good thing to have in a project in need of more users, and not a lot of developers.

I think it shouldn't be too hard to provide some sort of general "enable debugging" interface, then implement it in an engine-specific way.

@odysseus654
Copy link
Contributor Author

Okay, I will try to port this so it works within #1200 then. It will be QtScript specific and likely not applicable to V8 without a fair amount of UI development though.

@odysseus654
Copy link
Contributor Author

I do need to look at #1156, that may be relevant in what I'm currently doing on #1200 as well.

@digisomni
Copy link
Member

As long as the components are there, we can add UI for it later. :)

@daleglass
Copy link
Contributor

Okay, I will try to port this so it works within #1200 then. It will be QtScript specific and likely not applicable to V8 without a fair amount of UI development though.

Well, of course. My idea is that we should be able to have cool engine-specific features where possible. It's perfectly fine if not all engines have all the features.

@odysseus654
Copy link
Contributor Author

Yah, the real question I guess is whether the wires I rig up to get this working would be useful at all for V8.

But again, that question is really not part of any PR right now and can be adjusted later.

@digisomni
Copy link
Member

After talking to Heather, I realize what she meant.. Basically, this all goes away when we upgrade to Qt6 anyway because support will be dropped. Since we don't use the QtScript debugger right now then it's unlikely we will end up doing so within the next 6 or so months (within that timeframe Qt6 might be ready for us?)

So, then maybe having her port this over is not necessary?

@daleglass
Copy link
Contributor

Personally I think that a port to Qt6 in 6 months is very optimistic and unlikely. Qt6 still doesn't have QtWebEngine at this point, then it'll likely take fixing a bunch of stuff, no idea how much exactly. Before switching to Qt6 officially we'll likely need to do some fixes to the code, make new packages, test on all platforms, etc. It's probably doable in 6 months, but that's only if somebody is enthusiastic about making it happen.

Also there's no huge rush with making it happen either, as I don't see Qt5 go anywhere for quite some time still. I think it's definitely a very good thing to keep up with Qt development, but not so urgent that it absolutely needs to be done as soon as possible.

Anyway, yes, I realize this is going to go away eventually. My view here is:

  1. It's desirable to preserve functionality if we can. We want to get stuff done after all, and debugging is a good feature to have.
  2. This should be a doable thing. It's just 118 lines of code.
  3. Related to point 2, I think think this is a good test for the refactoring. Something like this should be possible in the new design, and it's small enough that I think it should be possible to work it in without that much trouble.

If it turns out that there's some serious technical block to making this work, then sure, I think we can let this one go. But I think it's worthwhile to at least try.

@JulianGro
Copy link
Contributor

This doesn't actually show up in the Sphinx documentation at all. Just for reference.

@digisomni digisomni added the allow-build-upload Allows the upload of a build for non white-listed users label May 15, 2021
@digisomni digisomni added this to the 2021.1.2 Eos Release milestone May 15, 2021
@daleglass daleglass added needs CR (code review) needs testing (QA) The PR is ready for testing scripting api change Change is made in the scripting API rebuild rebuild through the GithubActions and removed allow-build-upload Allows the upload of a build for non white-listed users labels May 15, 2021
@digisomni digisomni added the allow-build-upload Allows the upload of a build for non white-listed users label May 15, 2021
@odysseus654
Copy link
Contributor Author

odysseus654 commented May 15, 2021

I think the biggest issue is that ScriptEngine::runDebuggable() is a modified version of ScriptEngine::run(), which will be operating completely outside of the engine-specific area. So all references to _debugger need to be pruned out of here and pushed on to the engine-specific area (which I think here is ScriptEngine::evaluate). The alternative is to create a proxy version of QScriptEngineDebugger (ScriptEngineDebuggerPointer?), but I'm 99% sure that this interface will be completely useless with a non-Qt scripting engine.

@digisomni digisomni added rebuild rebuild through the GithubActions and removed rebuild rebuild through the GithubActions labels May 20, 2021
@daleglass daleglass self-requested a review May 20, 2021 21:53
@odysseus654
Copy link
Contributor Author

BTW after reviewing #1156 I can say that this PR is unrelated to that and would not affect that code.

@digisomni digisomni removed this from the 2021.1.2 Eos Release milestone May 28, 2021
@digisomni digisomni added this to the 2021.2.0 Selene Release milestone May 28, 2021
@digisomni digisomni added CR Approved At least one code reviewer has approved the PR. and removed needs CR (code review) labels Jun 3, 2021
@digisomni digisomni self-requested a review June 3, 2021 21:21
Copy link
Member

@digisomni digisomni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did minimal testing on Windows 10, appears to be working fine and scripts are running fine.

@digisomni digisomni added QA Approved The PR has been tested successfully. and removed needs testing (QA) The PR is ready for testing labels Jun 3, 2021
@digisomni digisomni merged commit d8a0d13 into vircadia:master Jun 3, 2021
@odysseus654 odysseus654 deleted the pr/drop-script-debugging branch June 6, 2021 00:01
@digisomni digisomni changed the title drop remaining references to QScriptEngineDebugger Drop remaining references to "QScriptEngineDebugger". Sep 7, 2021
@digisomni digisomni added the enhancement New feature or request label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allow-build-upload Allows the upload of a build for non white-listed users CR Approved At least one code reviewer has approved the PR. enhancement New feature or request QA Approved The PR has been tested successfully. rebuild rebuild through the GithubActions scripting api change Change is made in the scripting API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants