logos icon indicating copy to clipboard operation
logos copied to clipboard

%subclass should provide an @interface

Open DHowett opened this issue 11 years ago • 10 comments

Right now, %subclass treats self as an id. Logos could create a secret @interface (_logos_interface$_ungrouped$Blah, maybe?) and use that for self.

DHowett avatar Jul 26 '14 02:07 DHowett

Is this already a thing @kirb?

jithatsonei avatar Feb 14 '16 03:02 jithatsonei

No, and I'm not entirely sure how to go about this because it would break code that already has its own definition of the @interface. Maybe one day we'll get into semantic versioning so we can make breaking changes like this one (#111).

kirb avatar Feb 14 '16 08:02 kirb

If Logos could detect that (to wit: become an actual objc parser), we could use the user-provided class type or generate one as necessary. On Feb 14, 2016 12:46 AM, "Adam Demasi" [email protected] wrote:

No, and I'm not entirely sure how to go about this because it would break code that already has its own definition of the @interface. Maybe one day we'll get into semantic versioning so we can make breaking changes like this one (#111).

On Sun, 14 Feb 2016 at 14:07, alucard0134 [email protected] wrote:

Is this already a thing @kirb https://github.com/kirb?

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183815426.

Adam Demasi HASHBANG Productions hbang.com.au

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183853098.

DHowett avatar Feb 14 '16 08:02 DHowett

I'm a bit reluctant on really changing Logos much because I'm considering whether it could be replaced by @eswick's Logos-ish clang preprocessor (also, I'm terrible at Perl). Of course that introduces the need to compile code, and quite a lot of code at that. (Will make another issue for this)

(Edit: Lesson learned: email response does not parse Markdown 👎)

kirb avatar Feb 14 '16 08:02 kirb

Problem there is, it hasn't kept up with Clang as it's changed. I'm worried that it ties people to whatever arbitrary version of whatever random compiler they built when they got Theos. On Feb 14, 2016 12:55 AM, "Adam Demasi" [email protected] wrote:

I'm a bit reluctant on really changing Logos much because I'm considering whether it could be replaced by @eswick's Logos-ish clang preprocessor (also, I'm terrible at Perl). Of course that introduces the need to compile code, and quite a lot of code at that. (Will make another issue for this)

On Sun, 14 Feb 2016 at 19:18, Dustin L. Howett [email protected] wrote:

If Logos could detect that (to wit: become an actual objc parser), we could use the user-provided class type or generate one as necessary. On Feb 14, 2016 12:46 AM, "Adam Demasi" [email protected] wrote:

No, and I'm not entirely sure how to go about this because it would break code that already has its own definition of the @interface. Maybe one day we'll get into semantic versioning so we can make breaking changes like this one (#111).

On Sun, 14 Feb 2016 at 14:07, alucard0134 [email protected] wrote:

Is this already a thing @kirb https://github.com/kirb?

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183815426.

Adam Demasi HASHBANG Productions hbang.com.au

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183853098.

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183853280.

Adam Demasi HASHBANG Productions hbang.com.au

— Reply to this email directly or view it on GitHub https://github.com/theos/theos/issues/100#issuecomment-183855051.

DHowett avatar Feb 14 '16 08:02 DHowett

He also has a conflict of interest (recent Apple internship) so it may be infeasible anyway from a maintenance standpoint unless someone else can take over.

kirb avatar Feb 14 '16 08:02 kirb

I recconend sticking with Perl. With Clang, we'd have to update code for every new version. Like you said, I have an internship at Apple and don't have the time nor the will to keep it updated.

eswick avatar Feb 14 '16 13:02 eswick

Um I know this isn't the place but have you guys ever though of making a way to de-initlize groups?

andrewwiik avatar Feb 15 '16 01:02 andrewwiik

@andrewwiik: It isn't possible to implement that in a safe way with all of the behaviours that developers expect. Instead, it can be done in the tweak itself: always call %init() at startup and check a shouldPlayDead variable in the method hooks.

rpetrich avatar Feb 15 '16 02:02 rpetrich

Please create a new issue in future or get in touch on IRC or Twitter rather than hijacking an existing thread, @andrewwiik.

kirb avatar Feb 15 '16 22:02 kirb