Skip to content

Reorder resource prefix strip; fix #1926 - #1927

Open
dougthor42 wants to merge 1 commit into
bazel-contrib:masterfrom
dougthor42:gh1926
Open

Reorder resource prefix strip; fix #1926#1927
dougthor42 wants to merge 1 commit into
bazel-contrib:masterfrom
dougthor42:gh1926

Conversation

@dougthor42

Copy link
Copy Markdown

Description

Reorder resource prefix strip; fix #1926

Motivation

Fix #1926

@dougthor42

Copy link
Copy Markdown
Author

Hmm... interesting. I'll poke around more later. I was hoping this was a super-quick-end-of-friday-workday fix haha.

# Start from absolute resource path and then strip roots so we get to correct short path
# resource.short_path sometimes give weird results ie '../' prefix
path = resource.path
path = _strip_prefix(path, resource.root.path + "/")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd also add a regression test (expect_bazel_build_failure?), probably just the target layout from #1926 should be enough

@PawelLipski

Copy link
Copy Markdown
Collaborator

Whoops looks that it broke many other things, in turn 😅

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.

scala_library.resource_strip_prefix with generated resources breaks when called from a parent module

2 participants