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

Turbo navigator feedback #161

Closed
wants to merge 4 commits into from

Conversation

olivaresf
Copy link
Member

@olivaresf olivaresf commented Nov 16, 2023

Three minor things and one major thing. Feel free to cherry-pick any commits to your branch or merge if all commits are good!

  • a code comment that I could've added to the original PR
  • protocol conformance to use PathConfigurationIdentifiable
  • renaming Navigation to TurboNavigation
  • removing Turbo enum as it's creating a collision with the framework

The last point requires a bit of explanation: if an app that imports Turbo (the framework) has a class/struct with the same name as a turbo class/struct the compiler is unable to disambiguate which class/struct should be used.

For example, let's say the Demo app has a class named Session. Turbo has a class named Session too. In theory, there's no collision because they both exist in different namespaces. In order to use the app's Session, you'd explicitly declare it as DemoApp.Session. In order to use Turbo's, you'd say Turbo.Session.

However, since there exists an enum named Turbo, the compiler cannot disambiguate between:

  • Turbo.Session (trying to call class Session from framework Turbo)
  • Turbo.Session (trying to access a case or property from enum Turbo).

We should avoid naming classes/structs the same as the framework. If we're set on keeping the enum (which I don't like), we should at least rename it to something else.

I noticed Strada is doing this too. We need to fix it there too.

Let me know what you think!

@olivaresf olivaresf marked this pull request as draft November 16, 2023 17:52
@olivaresf olivaresf force-pushed the fernando/turbo-navigator-feedback branch from 00de565 to ec73f89 Compare November 16, 2023 17:55
@olivaresf olivaresf marked this pull request as ready for review November 16, 2023 17:56
@olivaresf olivaresf mentioned this pull request Nov 16, 2023
7 tasks
Naming is quite general. I'd prefer if we could change it to something omre specific.
@olivaresf
Copy link
Member Author

That last issue with the namespace is actually complicated to solve. I'll table that one for now, so please don't merge the branch as-is. I can open up a new one or you can cherry pick the other commits from here!

@olivaresf olivaresf closed this Nov 17, 2023
@joemasilotti
Copy link
Member

Everything but the Turbo -> TurboConfig rename looks good to me. Can you please remove that change? Then I'll merge in your PR into my branch.

@olivaresf
Copy link
Member Author

Everything but the Turbo -> TurboConfig rename looks good to me. Can you please remove that change? Then I'll merge in your PR into my branch.

Of course! I'll do it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants