GithubHelp home page GithubHelp logo

Issues running in Swift about chisel HOT 17 CLOSED

nickkjordan avatar nickkjordan commented on April 20, 2024
Issues running in Swift

from chisel.

Comments (17)

donshefer avatar donshefer commented on April 20, 2024

I'm seeing something similar in my Swift project:

(lldb) caflush
error: :1:22: error: expected ',' separator
(void)[CATransaction flush]

from chisel.

kastiglione avatar kastiglione commented on April 20, 2024

Thanks for the reports! I will try to take a look at this soon.

from chisel.

yxztj avatar yxztj commented on April 20, 2024

Hi, I'm also seeing this error:
(lldb) pviews
error: :1:20: error: expected ',' separator
(id)[(id)[UIWindow keyWindow] recursiveDescription]

from chisel.

kastiglione avatar kastiglione commented on April 20, 2024

@yxztj I just tried running pviews using the "Master-Detail Application" template that comes with Xcode. I could not reproduce the error you've reported. I am using the latest Xcode GM, 6.3.2 GM. If you're able to try the GM and let me know whether the GM fixes this for you, that would be great. Or, using whichever version you have installed currently, could you try creating a new project based on the "Master-Detail Application" template and let me know if pviews is broken? Thanks!

from chisel.

kastiglione avatar kastiglione commented on April 20, 2024

@donshefer I just tried caflush using Xcode 6.3.2 GM, and could not reproduce the error you reported. When you update to 6.3.2, if you try caflush on your Swift project and it still fails, I would love to know and investigate more. Thanks!

from chisel.

kastiglione avatar kastiglione commented on April 20, 2024

@nickkjordan I am seeing different errors when I run visualize. I'll look into them. I was calling visualize on a view. Were you calling it on a image, view, or layer?

from chisel.

nickkjordan avatar nickkjordan commented on April 20, 2024

This is bad, but I can't quite remember at this point. I think it was on a layer though, because I remember doing some animations around then

from chisel.

ignat980 avatar ignat980 commented on April 20, 2024

I am also getting this error.

(lldb) caflush
error: <EXPR>:1:22: error: expected ',' separator
(void)[CATransaction flush]
                     ^
                    ,

I am running the command within a swift context, and I have no idea how to change the language from swift inside the debugger. I think this is related to #74 and #68 .

from chisel.

 avatar commented on April 20, 2024

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

from chisel.

alireza avatar alireza commented on April 20, 2024

Seems like the problem only occurs in Swift projects in which lldb expects swift commands.

Basically, in the python scripts commands sent to the debugger using lldb.debugger.HandleCommand are all in objc. They won't work when lldb debugger is in swift mode.

from chisel.

stkent avatar stkent commented on April 20, 2024

Same issue and output as @ignat980 above. Is there an easier fix than explicitly updating all the commands sent to the debugger to use expression -l objc++?

from chisel.

schwarrrtz avatar schwarrrtz commented on April 20, 2024

Same issue and output as @ignat980 and @stkent. Similar issues with flicker.

from chisel.

theonepa1 avatar theonepa1 commented on April 20, 2024

self is of type UICollectionViewController. Ran mask and got following error.

(lldb) mask self.view
error: error: use of undeclared identifier 'self'
error: 1 errors parsing expression
Traceback (most recent call last):
File "/usr/local/opt/chisel/libexec/fblldb.py", line 81, in runCommand
command.run(args, options)
File "/usr/local/Cellar/chisel/1.2.0/libexec/commands/FBDisplayCommands.py", line 55, in run
layer = viewHelpers.convertToLayer(args[0])
File "/usr/local/opt/chisel/libexec/fblldbviewhelpers.py", line 51, in convertToLayer
if fb.evaluateBooleanExpression('[(id)%s isKindOfClass:(Class)[CALayer class]]' % viewOrLayer):
File "/usr/local/opt/chisel/libexec/fblldbbase.py", line 69, in evaluateBooleanExpression
return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
File "/usr/local/opt/chisel/libexec/fblldbbase.py", line 61, in evaluateIntegerExpression
output = evaluateExpression('(int)(' + expression + ')', printErrors).replace(''', '')
AttributeError: 'NoneType' object has no attribute 'replace'

from chisel.

webdevotion avatar webdevotion commented on April 20, 2024

@ultramiraculous, from what I saw in #121 you expected this ticket to be resolved as wel.
Today I still get an error when running for example mask self.view in lldb.
Got rid of my Homebrew install and using a clone from the main branch.

(lldb) mask self.view
error: error: use of undeclared identifier 'self'
error: 1 errors parsing expression
error: error: use of undeclared identifier 'None'
error: 1 errors parsing expression
error: <EXPR>:1:13: error: expected ',' separator
(void)[None removeFromSuperview]
            ^
           ,
error: <EXPR>:1:22: error: expected ',' separator
(void)[CATransaction flush]
                     ^
                    ,
error: error: use of undeclared identifier 'None'
error: 1 errors parsing expression
Traceback (most recent call last):
  File "/...path-to-chisel.../chisel/fblldb.py", line 79, in runCommand
    command.run(args, options)
  File "/...path-to-chisel.../chisel/commands/FBDisplayCommands.py", line 93, in run
    viewHelpers.maskView(viewOrLayer, options.color, options.alpha)
  File "/...path-to-chisel.../chisel/fblldbviewhelpers.py", line 24, in maskView
    origin = convertPoint(0, 0, viewOrLayer, window)
  File "/...path-to-chisel.../chisel/fblldbviewhelpers.py", line 46, in convertPoint
    fromLayer = convertToLayer(fromViewOrLayer)
  File "/...path-to-chisel.../chisel/fblldbviewhelpers.py", line 51, in convertToLayer
    if fb.evaluateBooleanExpression('[(id)%s isKindOfClass:(Class)[CALayer class]]' % viewOrLayer):
  File "/...path-to-chisel.../chisel/fblldbbase.py", line 69, in evaluateBooleanExpression
    return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
  File "/...path-to-chisel.../chisel/fblldbbase.py", line 61, in evaluateIntegerExpression
    output = evaluateExpression('(int)(' + expression + ')', printErrors).replace('\'', '')
AttributeError: 'NoneType' object has no attribute 'replace'

from chisel.

tracicot avatar tracicot commented on April 20, 2024

I'm seeing the same issues. Executing show scrollView results in:
error: <EXPR>:1:19: error: expected ',' separator (void)[scrollView setHidden:0] ^ , error: <EXPR>:1:22: error: expected ',' separator (void)[CATransaction flush] ^ ,

from chisel.

albertstartup avatar albertstartup commented on April 20, 2024

Using show and hide work when using clone from main branch. Try cloning the latest version @tracicot
mask still produces same error as @webdevotion

from chisel.

kastiglione avatar kastiglione commented on April 20, 2024

I think this be closed now. Swift interop has been improved, and we can create new issues for specific issues as they arise.

from chisel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.