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

Xcode version 13.2 build issue #36

Closed
farshadmb opened this issue Oct 6, 2022 · 10 comments
Closed

Xcode version 13.2 build issue #36

farshadmb opened this issue Oct 6, 2022 · 10 comments
Assignees
Labels
question Further information is requested

Comments

@farshadmb
Copy link

farshadmb commented Oct 6, 2022

Hi bro,
I use Xcode 13.2 as a daily basis IDE. however, I met a compile error segmentation fault 11 for some files such as StateController line 675 columns 13. I've also realized that there is no Xcode backward compatibility. I've wondered so much as well.

Do you have any clue what's wrong with it?

@ekazaev
Copy link
Owner

ekazaev commented Oct 7, 2022

@farshadmb hi. No. Not really. And I don’t have the Xcode 13.2 at this moment. Can you please try one of the previous versions to check if it compile. But this issue means that it is the compiler bug.

Ill have a look later

@farshadmb
Copy link
Author

farshadmb commented Oct 7, 2022

@ekazaev hi, bro, I actually did it. look at commit id c48557a1cfd659714981fad6eb04242898d6e949. everything works fine.
Also, I tried to build commit by commit. if you move from mentioned commit to the head commit, Xcode would not build at all.

One more thing, in some cases you try to make mutable some properties by using exactly the same name. Swift 5.5 and later are fine but earlier versions make compiler present errors.

var sections = sections

https://github.com/farshadmb/ChatLayout/blob/6f66082bf5f78fe82b85b34c8fc02e9960dde77a/ChatLayout/Classes/Core/Model/LayoutModel.swift#L151

@farshadmb
Copy link
Author

@ekazaev I highly encourage you to create a GitHub action workflow to run test cases on a specified Xcode version.
I would like to create one for you.

@ekazaev
Copy link
Owner

ekazaev commented Oct 7, 2022

segmentation fault 11 It is a bug in the compiler in the first place, but this fact is not even important in this case. Another thing is that I have already moved to swift 5.7 at the end of July and where that expression is a valid string. I can fix it but you may get some next problem with #unavailable or something like this as XCode 13.2 is not even the latest XCode 13 version. So I am not sure if I have to do something about it, as if you are using the previous version of the compiler, probably it worth to use an older version of the library that is written in swift 5.2. There is nothing wrong with it and you are clearly not interested in the fixes added for IOS 16 SDK that were added later.

So I am not sure what action to take here TBH. If you are for some reason temporary can not update but intrested in the latest version of the library - Id say it probably worth to have a temporary fork of the library where you fix those issues until youll be able to move to swift 5.7. @farshadmb What do you think?

Regarding GitHub action - please do. Ill appreciate it.I used travis while it was free. But I dont have any CI any more.

@ekazaev ekazaev self-assigned this Oct 7, 2022
@ekazaev ekazaev added the question Further information is requested label Oct 7, 2022
@farshadmb
Copy link
Author

@ekazaev I will do it as fast as I could. also, I provide a GitHub action for this repository as well because Github makes totally free for open projects such as yours.

@ekazaev
Copy link
Owner

ekazaev commented Oct 7, 2022

@farshadmb Thank you. Ill also have a look when ill have time.
But I assure you that there is nothing wrong with the older version of the library, so if you can not update your xcode just temporary - just use the older version. There was only one problematic version where i had a typo in a binary search algorithm and as far as i remember I fixed it in swift 5.2 version. And if not - its such a small defect that you may never even hit it. And I assume you’ll be able to update your compiler version and the library later, before the release of your application.

Best of luck.

@ekazaev
Copy link
Owner

ekazaev commented Oct 10, 2022

@farshadmb Morning. I have checked the library in XCode 13.2. The issue is not in the line that you pointed out but in the use of the associated values in the models and it is clearly a compiler bug. But anyways I made for you a version of the library that compiles in XCode 13.2. You can check it out in the branch xcode_13_2_issue.

Please, let me know if I can help you further.

@ekazaev
Copy link
Owner

ekazaev commented Oct 13, 2022

@farshadmb Ill close this issue for now. Hope the branch I provided will cover your needs. Please dont hesitate to reopen this issue if you need any further assistance.

@ekazaev ekazaev closed this as completed Oct 13, 2022
@farshadmb
Copy link
Author

Thanks, I will work on it in my spare time, however, my plate is so full.

@ekazaev
Copy link
Owner

ekazaev commented Oct 14, 2022

I know your pain :) . Best of luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants