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

Stability of layer data attributes #6194

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #3175.

It avoids dropping attributes in some places and actively restores them in other places.
Attributes should now be stable from the moment aesthetics are computed up to the Geom$draw_*() methods.

@teunbrand
Copy link
Collaborator Author

I cannot figure out why coverage is failing and R CMD check passes.

@yutannihilation
Copy link
Member

I too cannot figure out, but I confirmed this error is reproducible on my local. As it looks too cryptic, maybe we can just ignore the failing tests for now? cf. https://covr.r-lib.org/#exclusions

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-layer.R:177:3'): attributes on layer data are preserved ──────
attr(ld, "test") (`actual`) not equal to "preserve me" (`expected`).

`actual` is NULL
`expected` is a character vector ('preserve me')
── Failure ('test-scales.R:71:3'): identity scale preserves input values ───────
`d1` (`actual`) not equal to `d2` (`expected`).

     names(actual) | names(expected)     
 [1] "shape"       - "size"          [1] 
 [2] "size"        - "alpha"         [2] 
 [3] "alpha"       - "x"             [3] 
 [4] "x"           - "y"             [4] 
 [5] "y"           - "colour"        [5] 
 [6] "colour"      - "fill"          [6] 
 [7] "fill"        - "shape"         [7] 
 [8] "PANEL"       | "PANEL"         [8] 
 [9] "group"       | "group"         [9] 
[10] "stroke"      | "stroke"        [10]

[ FAIL 2 | WARN 1 | SKIP 258 | PASS 1593 ]

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.

Access to layer information during build stages
2 participants