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

Examples: Add a Hello World example using Hummingbird #3

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

euanh
Copy link
Collaborator

@euanh euanh commented Sep 30, 2024

Motivation

Having simple "getting started" examples is helpful for new users. Some users may be more familiar with Hummingbird instead of Vapor.

Modifications

Adds another example, using Hummingbird, and links it into the documentation.

Result

New users who want to use Hummingbird can start from a tested starting point.

Test Plan

Built and deployed the example locally, and ran the soundness checks.

@euanh
Copy link
Collaborator Author

euanh commented Sep 30, 2024

@euanh euanh added the area/documentation Improvements or additions to documentation label Sep 30, 2024
@euanh euanh marked this pull request as ready for review September 30, 2024 15:00
@euanh euanh marked this pull request as draft September 30, 2024 15:02
@euanh euanh force-pushed the hummingbird-example branch 7 times, most recently from f800da9 to 0c9803a Compare October 4, 2024 11:26
@euanh
Copy link
Collaborator Author

euanh commented Oct 7, 2024

The Hummingbird fix for building with the Static SDK has been merged but is not yet in a release.

@adam-fowler
Copy link

adam-fowler commented Oct 8, 2024

v2.1.0 was released yesterday.

EDIT: we might find this crashes now as apple/swift-async-algorithms#325 is still not in a release of AsyncAlgorithms.

@euanh euanh marked this pull request as ready for review October 8, 2024 16:05
@euanh
Copy link
Collaborator Author

euanh commented Oct 8, 2024

v2.1.0 was released yesterday.

🎉

EDIT: we might find this crashes now as apple/swift-async-algorithms#325 is still not in a release of AsyncAlgorithms.

This simple hello world example seems to work for me (on x86), but maybe more complex examples will break. I see that the issue on the hummingbird repo is on ARM - maybe that's significant?

@euanh euanh merged commit a393d2b into apple:main Oct 8, 2024
13 checks passed
@euanh euanh deleted the hummingbird-example branch October 8, 2024 16:11
@euanh
Copy link
Collaborator Author

euanh commented Oct 8, 2024

EDIT: we might find this crashes now as apple/swift-async-algorithms#325 is still not in a release of AsyncAlgorithms

https://github.com/apple/swift-async-algorithms/releases/tag/1.0.2 has just been tagged and should have the fix in it.

@adam-fowler
Copy link

Oh awesome!

@euanh
Copy link
Collaborator Author

euanh commented Oct 9, 2024

The example server did eventually crash after sitting idle for a while. This build was using the previous release of async-algorithms, and seemed to work initially. I'll try it with the new release.

2024-10-08T16:06:30+0000 info Hummingbird : [HummingbirdCore] Server started and listening on 0.0.0.0:8080
AsyncAlgorithms/MergeStateMachine.swift:589: Fatal error: Invalid state
Current stack trace:
0    <unknown>                          0x000000000265d281
1    <unknown>                          0x0000000002256277
2    <unknown>                          0x0000000002256083
3    <unknown>                          0x00000000022564d9
4    <unknown>                          0x00000000024152e6
5    <unknown>                          0x000000000179b487
6    <unknown>                          0x000000000179c6fb
7    <unknown>                          0x00000000026a2b23
8    <unknown>                          0x00000000026a3a95
9    <unknown>                          0x000000000275a5cc
10   <unknown>                          0x000000000275a439
11   <unknown>                          0x0000000002763b46

@adam-fowler
Copy link

Others have verified that AsyncAlgorithms v1.0.2 fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants