Skip to content

Conversation

@mredig
Copy link
Contributor

@mredig mredig commented Jul 30, 2024

I ran into a few issues that weren't easily googleable and therefore required a decent level of troubleshooting to discover, so I updated the docs to help others overcome these hurdles.

@mredig mredig requested review from kubamracek and rauhul as code owners July 30, 2024 06:56
@mredig
Copy link
Contributor Author

mredig commented Jul 30, 2024

Resolves Issue #20

``` console
$ cd pico-blink
$ TOOLCHAINS='<toolchain-name>' ./build.sh
$ TOOLCHAINS='<toolchain-name>' ./build.sh # toolchain-name is typically `swift`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think is actually true. I have multiple toolchains installed and if I set TOOLCHAINS=swift, I do not get the latest one chosen.

But point taken that the instructions are not really clear on what the TOOLCHAINS variable should be set to...

Copy link
Member

Choose a reason for hiding this comment

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

I dont think we want to suggest swift as the toolchain name because when a user has multiple toolchains installed its very very unclear which one is getting used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree! How would I fix this instruction? It's the only thing that I could find that worked for my situation, but it wasn't clear where I was supposed to source a value from. (I had also tried a path to the toolchain via a ChatGPT suggestion amongst several other attempts, but none of those worked)

Copy link
Member

Choose a reason for hiding this comment

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

I described the instructions here: https://apple.github.io/swift-matter-examples/tutorials/swiftmatterexamples/setup-macos

But its annoying we keep repeating these instructions across tons of examples/tutorials

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a link to those instructions - thoughts on that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also changed toolchain-name to toolchain-identifier since that seems to more accurately reflect what it is and what it's referred to as in the given instructions. (not to mention it would have clarified a lot of my own confusion when I was looking for a name and not an identifier - I think I even glanced into the plist and mentally discarded the id since that's not what was requested)

Copy link
Member

Choose a reason for hiding this comment

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

I added a link to those instructions - thoughts on that?

It's definitely an option and might be ok for now. @cmcgee1024 do you have thoughts on where we can host more details "how to use a custom toolchain" instructions? I really do not want to maintain this information in every embedded examples repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're given freedom to create your own tutorials like the matter one, I think that a tutorial on sourcing, using, identifying, etc on toolchains might be worth it on its own.

Copy link
Member

Choose a reason for hiding this comment

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

We could certainly create such a tutorial in this repo, but I would prefer we have something hosted on Swift.org

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just meant in the same style as the matter one, not really intending a specific location for it to go. Wherever the home, links could send people there.

@rauhul
Copy link
Member

rauhul commented Aug 28, 2024

@mredig I've rebased and pushed some changes to the approach you had taken. Since we have multiple pico examples and the STM examples also need macholib I've elevated the python instructions to the top level readme.

Let me know what you think!

@rauhul
Copy link
Member

rauhul commented Sep 5, 2024

Im gonna merge this as is, feel free to comment and/or open a pr with changes if desired

@rauhul rauhul merged commit a0f9d8d into swiftlang:main Sep 5, 2024
@mredig
Copy link
Contributor Author

mredig commented Sep 5, 2024

Im gonna merge this as is, feel free to comment and/or open a pr with changes if desired

Ah I'm sorry! I missed the notification. It all looks good though! :D

trundlebits pushed a commit to trundlebits/swift-embedded-examples that referenced this pull request Jul 18, 2025
Co-authored-by: Rauhul Varma <rauhul@apple.com>
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.

3 participants