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

remove unneeded HTML report generation steps from build #545

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

nancywu1
Copy link
Contributor

@nancywu1 nancywu1 commented Nov 14, 2024

don't need to generate the HTML formatted coverage reports from genhtml, only the _coverage_report.dat is needed for codecov

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

Version

Published prerelease version: 0.10.0-next.5

Changelog

Release Notes

Minor Docs Fixes (#538)

  • Fix search on next subdomain searching against and redirecting to latest
  • Update page description on the landing page

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

More Doc Fixes (#532)

  • Fix links for latest and next pages
  • Add package manager tabs for js install instructions
  • Fix version selector breaking on main page

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

Fix docs build visibility (#531)

Fix visibility of docs build

ios: enhance tapable logger to handle variadic args from the JS log (#524)

Prefixing message with the format [Player] [\(logLevel)]: moved out of the Tapable logger and moved to PrintLoggerPlugin. Any consumers using their own LoggerPlugin will need to append the logLevel if they want to print it

Before

public class CustomLoggingPlugin: NativePlugin {
    
    public let pluginName = "CustomLoggingPlugin"

    public func apply<P>(player: P) where P: HeadlessPlayer {
        guard let player = player as? SwiftUIPlayer else { return }
        player.logger.logLevel = .trace
        player.logger.hooks.trace.tap(name: pluginName, { print("Custom message")\(($0))" ) })
        ...
    }

After

public class CustomLoggingPlugin: NativePlugin {
    
    public let pluginName = "CustomLoggingPlugin"

    public func apply<P>(player: P) where P: HeadlessPlayer {
        guard let player = player as? SwiftUIPlayer else { return }
        player.logger.logLevel = .trace
        let prefixedMessage = "[Player] [trace]: "
        player.logger.hooks.trace.tap(name: pluginName, { print("\(prefixedMessage) Custom message \(($0))" ) })
        ...
    }

Breaking Changes

Any usage of the player.logger.hooks taps will have breaking changes in the callback because the calls have been changed to provide a [Any] type instead of String so it can be returned in the form of messages instead of a single message. Unless nothing is done in the callback to access the value but just to print it, there should be breaking changes

Example:

// this should be no breaking change
player.logger.hooks.trace.tap(name: "log", { print("\(($0))" ) })

// if `values` should be accessed in anyway, i.e want the first value, or want to seperate the values
 player.logger.hooks.debug.tap(name: "log") { values in
            // values is of type [Any], if you want to print only the first value
            print("\((message as? [String])?.first))" )
        }

🚀 Enhancement

  • ios: enhance tapable logger to handle variadic args from the JS log #524 (@nancywu1)

🐛 Bug Fix

🏠 Internal

📝 Documentation

Authors: 6

@nancywu1 nancywu1 changed the title remove unneeded HTML report generation from build remove unneeded HTML report generation steps from build Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.57%. Comparing base (4ba64f4) to head (e407934).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
- Coverage   91.88%   89.57%   -2.31%     
==========================================
  Files         341      331      -10     
  Lines       27303    19718    -7585     
  Branches     1944     1949       +5     
==========================================
- Hits        25087    17663    -7424     
+ Misses       2202     2041     -161     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nancywu1 nancywu1 marked this pull request as ready for review November 14, 2024 19:14
@nancywu1 nancywu1 requested a review from adierkens as a code owner November 14, 2024 19:14
@nancywu1 nancywu1 merged commit fb57765 into main Nov 14, 2024
10 of 11 checks passed
@nancywu1 nancywu1 deleted the remove-html-generation branch November 14, 2024 19:14
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