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

Support SPM installation #1379

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

allenhumphreys
Copy link

Fixes #1372 #1370

To test:

You can add .package(url: "https://github.com/allenhumphreys/AztecEditor-iOS", branch: "ah/spm") to the dependencies in a sample application. If needed I can create a repo with a sample application that consumes the package.


  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.

@@ -967,8 +967,7 @@
F1DC21B22199D58B007C189E /* ElementToAttributedString */,
F1E75630215B0C9E004BC254 /* StringAttributesToAttributes */,
);
name = Converters;
path = "New Group";
path = Converters;
Copy link
Author

Choose a reason for hiding this comment

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

I noticed that this group was not properly renamed on disk and renamed it so it shows up correctly in SPM.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

This file is not part of the Xcode project, but SPM was picking it up and failing to compile.

Copy link
Author

Choose a reason for hiding this comment

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

This file is not part of the Xcode project, but SPM was picking it up and failing to compile.

@allenhumphreys
Copy link
Author

I just want to say thanks for the awesome library. I know I didn't ask about adding this support before opening the PR, it's ok if this doesn't align with your goal, though. I had trouble finding your project when looking to solve what this solves, and I'd love to get it listed in the swift package index if this goes through.

@erolando
Copy link

good job @allenhumphreys

@jkmassel
Copy link
Contributor

Thanks for the work here @allenhumphreys – I'm in the midst of reviewing this, but it may take a few more days. Just wanted to provide an update.

@mokagio
Copy link
Contributor

mokagio commented Jan 17, 2025

You'll notice that the checks have failed. I pushed #1403 to trigger CI but unfortunately we let this PR sit here for so long that the Xcode tooling its branch uses is out of date. I'll be working on upgrading the tooling first, then update my test branch, then go from there...

Also worth noting that when I try to run the tests from Xcode locally from the workspace, they fail to build because they cannot find Bundle.aztecTestsBundle.

image

When I try to open .swiftpm/xcode/package.xcworkspace, Xcode 16.2 crashes

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Xcode [83802]

Application Specific Information:
abort() called


Application Specific Signatures:
IDESwiftPackage.swift:1220@@packageStructureDidChange(at:)

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x1964855d0 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1964bdc20 pthread_kill + 288
2   libsystem_c.dylib             	       0x1963caa30 abort + 180
3   IDEKit                        	       0x106d31554 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964
4   IDEKit                        	       0x106d31e8c -[IDEAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 780
5   DVTFoundation                 	       0x102ebd388 _DVTAssertionHandler + 472
6   DVTFoundation                 	       0x102ebd7f4 _DVTAssertFromSwift + 260
7   DVTFoundation                 	       0x1030da514 specialized withVaList<A>(_:_:) + 252
8   DVTFoundation                 	       0x1030d8e44 DVTAssertError(_:file:line:function:) + 464
9   DVTFoundation                 	       0x1031e3844 Optional.unwrap(orAssert:file:line:function:) + 264
10  IDESwiftPackageCore           	       0x1338e3888 IDESwiftPackage.packageStructureDidChange(at:) + 1420
11  IDESwiftPackageCore           	       0x1338e40b0 protocol witness for SPMPackageDirectoryStructureFileSystemWatcherDelegate.packageStructureDidChange(at:) in conformance IDESwiftPackage + 20
12  SwiftPM                       	       0x14f8c98d0 specialized closure #1 in variable initialization expression of SPMPackageDirectoryStructureFileSystemWatcher.fileSystemEventHandler + 2692
13  FSEvents                      	       0x19ee2eee4 implementation_callback_rpc + 3660
14  FSEvents                      	       0x19ee2e010 _Xcallback_rpc + 220
15  FSEvents                      	       0x19ee2df08 FSEventsD2F_server + 68
16  FSEvents                      	       0x19ee3113c FSEventsClientProcessMessageCallback + 72
17  CoreFoundation                	       0x1965ccf94 __CFMachPortPerform + 248
18  CoreFoundation                	       0x19659da6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
19  CoreFoundation                	       0x19659d98c __CFRunLoopDoSource1 + 524
20  CoreFoundation                	       0x19659c350 __CFRunLoopRun + 2244
21  CoreFoundation                	       0x19659b434 CFRunLoopRunSpecific + 608
22  HIToolbox                     	       0x1a0d4619c RunCurrentEventLoopInMode + 292
23  HIToolbox                     	       0x1a0d45fd8 ReceiveNextEventCommon + 648
24  HIToolbox                     	       0x1a0d45d30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
25  AppKit                        	       0x199dfacc8 _DPSNextEvent + 660
26  AppKit                        	       0x19a5f14d0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
27  AppKit                        	       0x199dedffc -[NSApplication run] + 476
28  IDEKit                        	       0x106d00f14 -[IDEApplication run] + 192
29  AppKit                        	       0x199dc5240 NSApplicationMain + 880
30  dyld                          	       0x196133154 0x19612d000 + 24916

@allenhumphreys
Copy link
Author

@mokagio i can probably update this branch next week. Running tests from Xcode did originally work, but it’s been quite some time!

@mokagio mokagio mentioned this pull request Jan 17, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please support SPM~~~
4 participants