Skip to content

Ywmei/windows build #3801

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

Merged
merged 3 commits into from
Jun 17, 2022
Merged

Ywmei/windows build #3801

merged 3 commits into from
Jun 17, 2022

Conversation

ywmei-brt1
Copy link
Contributor

@ywmei-brt1 ywmei-brt1 commented Jun 11, 2022

adjust the file seperator so that this sdk code package can be build on windows machine
Ref: #2311 (comment)

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 11, 2022

Coverage Report 1

Affected Products

  • firebase-database

    Overall coverage changed from 50.18% (8e28b5b) to 50.17% (a971c81) by -0.01%.

    FilenameBase (8e28b5b)Merge (a971c81)Diff
    ViewProcessor.java92.10%91.79%-0.30%
  • firebase-firestore

    Overall coverage changed from 46.21% (8e28b5b) to 46.19% (a971c81) by -0.02%.

    FilenameBase (8e28b5b)Merge (a971c81)Diff
    AsyncQueue.java78.61%77.61%-1.00%
    GrpcCallProvider.java58.82%55.29%-3.53%
    SetMutation.java97.22%94.44%-2.78%
  • firebase-perf

    Overall coverage changed from 71.40% (8e28b5b) to 71.43% (a971c81) by +0.03%.

    FilenameBase (8e28b5b)Merge (a971c81)Diff
    TransportManager.java94.88%95.81%+0.93%
  • firebase-storage

    Overall coverage changed from 85.85% (8e28b5b) to 86.24% (a971c81) by +0.39%.

    FilenameBase (8e28b5b)Merge (a971c81)Diff
    StorageException.java65.45%69.09%+3.64%
    StorageTask.java84.29%84.89%+0.60%
    UploadTask.java80.58%82.37%+1.80%

Test Logs

Notes

  • Commit (a971c81) is created by Prow via merging PR base commit (8e28b5b) and head commit (59d0494).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/t4u6cDJHNl.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 11, 2022

@ywmei-brt1
Copy link
Contributor Author

I have updated both the ThirdPartyLicensesExtension.java and the PublishingPlugin.java with setUrl(file.toURI()) method.

After these change, the entire project is able to sync on Windows machine, but when running firebase-inappmessaging-display:ktx's unit test, the following error message will be shown:

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':transport:transport-runtime:generateReleaseProto'.
> protoc: stdout: . stderr: --firebaseEncoders_out: com.google.firebase.encoders.proto.codegen.InvalidConfigException: Config file 'E' does not exist or is a directory.
  
  	at com.google.firebase.encoders.proto.codegen.MainKt.driver(Main.kt:38)
  
  	at com.google.firebase.encoders.proto.codegen.MainKt.main(Main.kt:62)
  
  

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':transport:transport-runtime:generateDebugProto'.
> protoc: stdout: . stderr: --firebaseEncoders_out: com.google.firebase.encoders.proto.codegen.InvalidConfigException: Config file 'E' does not exist or is a directory.
  
  	at com.google.firebase.encoders.proto.codegen.MainKt.driver(Main.kt:38)
  
  	at com.google.firebase.encoders.proto.codegen.MainKt.main(Main.kt:62)
  
  
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    ==============================================================================
  • Get more help at https://help.gradle.org`

Copy link
Collaborator

@rlazo rlazo left a comment

Choose a reason for hiding this comment

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

Thanks, it looks more consistent!

@rlazo
Copy link
Collaborator

rlazo commented Jun 14, 2022

@ywmei-brt1
Copy link
Contributor Author

Don't forget to update the test @ https://github.com/firebase/firebase-android-sdk/blob/ywmei/windows-build/buildSrc/src/test/kotlin/com/google/firebase/gradle/plugins/LicenseResolverPluginTests.kt

I have updated the unit test, but when I try to run this unit test under firebase-andorid-sdk root, I got the following build fail message:

FAILURE: Build failed with an exception.
* What went wrong:
Project 'buildSrc' not found in root project 'com.google.firebase'.

Then, I tried to open the buildSrc as a independent Kotlin Project, I got the following sync fail message:

Execution failed for task ':wrapper'.
> Could not create task ':compileKotlin'.
   > org.gradle.api.internal.TaskInternal.setLoggerMessageRewriter(Lorg/gradle/internal/logging/slf4j/ContextAwareTaskLogger$MessageRewriter;)V

@ywmei-brt1
Copy link
Contributor Author

I have tried to run the unit test inside of the buildSrc directory, the build is success, but the test is skipped.
This thing is happen on both the master branch and this feature branch.

ywmei@ywmei:~/Workspace/SDK/firebase-android-sdk/buildSrc$ ../gradlew test --scan
Starting a Gradle Daemon, 3 busy Daemons could not be reused, use --status for details
> Task :compileKotlin UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :pluginDescriptors UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :compileTestKotlin UP-TO-DATE
> Task :pluginUnderTestMetadata UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test SKIPPED

BUILD SUCCESSFUL in 8s
6 actionable tasks: 6 up-to-date


@rlazo
Copy link
Collaborator

rlazo commented Jun 17, 2022

After looking into your issue reported (#3820 ) I reviewed our CI jobs. We have a build-plugins-check that runs in PRs that modify plugins. It passes, so you are good to go. If you want to run it locally, use

../gradlew -PenablePluginTests=true check

@rlazo rlazo requested a review from vkryachko June 17, 2022 03:36
@ywmei-brt1 ywmei-brt1 marked this pull request as ready for review June 17, 2022 13:45
for (String s : licenseUris) {
this.licenseUris.add(URI.create(s));
File file = new File(s);
Copy link
Member

Choose a reason for hiding this comment

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

afaicr we used to allow specifying http(s) urls in thirdPartyLicenses{}, looks like it will no longer work.

I think it's fine since it has never been used, but wanted to call it out for future reference.

@ywmei-brt1 ywmei-brt1 merged commit ceb740d into master Jun 17, 2022
@ywmei-brt1 ywmei-brt1 deleted the ywmei/windows-build branch June 17, 2022 15:58
@firebase firebase locked and limited conversation to collaborators Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants