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

feat: adding better logging on iOS build command when generate shorebird file is not found. #57

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

erickzanardo
Copy link

A few issues are reporting a similar error:

Exception: Cannot find shorebird.yaml

That log doesn't tell us much though. This PR doesn't solve that issue, but adds better logging when this is happens so we can try troubleshoot this better.

Copy link

@eseidel eseidel left a comment

Choose a reason for hiding this comment

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

lgtm, do we need a test?

@erickzanardo
Copy link
Author

lgtm, do we need a test?

I would love to add a test for this, but unfortunately I still am not able to reproduce the issue. I am hopping that with this log, we might be able to get better information.

// The max depth is just a hard limit to prevent the cli from going to far behind.
// This limit should never be reached though, since at least the `Applications` or
// `Products` folder should exist, no matter what changed in the app.
const int maxDepth = 7;
Copy link

Choose a reason for hiding this comment

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

Why have the max depth at all?

Copy link
Author

Choose a reason for hiding this comment

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

I might be too overcautious here, but I was worried that we end up recurring back too much and end in a user "personal" folder and kind trigger the user that we are invading their files.

This depth makes sure that we don't go past the build folder.

Copy link

Choose a reason for hiding this comment

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

Comment should probably say that then. :)

@erickzanardo
Copy link
Author

Example of output:

[   +1 ms] [shorebird] failed to generate shorebird configuration.
           Exception: Cannot find shorebird.yaml in /Users/erick/projects/shorebird/supports/gh_2212/dashes-are-fun/build/ios/archive/Super.xcarchive/Products/Applications/Super.Pato.app/Frameworks/App.framework/flutter_assets/shorebird.yaml.
           Resolved app name: Super.Pato.app

           Closest existing parent:
             PATH: /Users/erick/projects/shorebird/supports/gh_2212/dashes-are-fun/build/ios/archive
             CHILDREN: Super.Pato.xcarchive

           Please file an issue at: https://github.com/shorebirdtech/shorebird/issues/new
           ```

@erickzanardo erickzanardo merged commit 1758388 into shorebird/dev Jun 12, 2024
4 of 7 checks passed
@erickzanardo erickzanardo deleted the feat/better-ios-shorebird-yaml-logging branch June 12, 2024 16:25
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.

2 participants