-
-
Notifications
You must be signed in to change notification settings - Fork 358
siblingElements()
returns empty collection when build in release mode
#179
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
Comments
btw using SwiftSoup 2.3.2, Swift 5.3.2, and XCode 12.4. |
i might believe that i've done that correctly but maybe not. i've made the changes in XCode, but i'm building the release through the command line, with |
ok so i've compiled the release through Xcode and the issue seems to be with the |
i was able to create a CLI that works from SPM with following command: |
No fix for this yet? This made my app completely unusable on release builds. It also effects Using 2.3.2. Although I'm still confused because my release builds for an earlier version of my app (last week) worked. I solved the issue by turning off both code-optimization settings in Xcode. |
this has been closed without any hello but the issue is still there. just tested. |
@godbout can you provide an HTML to test it? |
hello. (haha.) sure, here you go: https://gist.github.com/godbout/2fafd288d4c55d36405f93072975755c works totally fine until i create an archive that turns the optimizations on. at the end i can still compile something, it's just 1 meg higher than needed but ok. but may be nice to find out what's going on? (put Marvin Gaye's album on...) |
@godbout in this html example what are selecting? |
omg what a DUMBASS i am LMAO. made a mistake in the search query. gist updated. |
@godbout work in release mode. |
yeah in my case it fails as soon as it's in RELEASE mode. in DEBUG it finds the items, in RELEASE it doesn't. i'll investigate again though as that's almost a year old issue and i'll post here the results. thanks! |
tested here, same. works well in DEBUG without optimizations. when i RELEASE it doesn't work, except if i remove the optimizations. will send more info. |
a video showing the issue:
ScreenFlow.mp4 |
the test run in the video is here: https://github.com/godbout/AlfredKat/blob/534c10aaf6c49b48f50c0446777e4508bef3e2b1/Tests/AlfredKatCoreTests/Feature/WorkflowTests.swift#L45 maybe it's just me doing something wrong. would not discard this possibility. |
Found the bug, parent Node in SwiftSoup is in weak, weak var parentNode: Node? If you call document should be put in a variable and set to nil only after use is finished, if it is freed all the elements not retained in memory will be removed. I'll think of a solution. |
makes total sense this is a
barely dealing with |
@godbout issue resolved, try now with 2.3.7 |
Nevermind, i make a rollback with 2.3.8. The issue steel live for now |
ah, sorry. thought i put this in the email snooze but didn't seem so. my bad. the fix created other issues? |
is this still an issue? |
i've tried removing optimization levels for release for SwiftSoup but doesn't help.
the code:
in both debug and release mode the
.first()
element is the same and not nil, but only in debug mode i can grab the siblings. in release mode i get nothing.just a few months old in Swift/Xcode so it's probably on my side. i've built a library that i use along SwiftSoup and it works fine. but i can't figure out that last one. any idea what am i be doing wrong? thanks!
The text was updated successfully, but these errors were encountered: