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

Compile resx file into binary resource file for use in AssemblyAction #98

Closed
wants to merge 46 commits into from
Closed

Compile resx file into binary resource file for use in AssemblyAction #98

wants to merge 46 commits into from

Conversation

jrbeverly
Copy link
Contributor

@jrbeverly jrbeverly commented Oct 23, 2019

Compiles a single resx file into a common language runtime binary resource file.

Example usage:

csharp_resx(
    name = "hello.resources.mystrings",
    src = "Strings.resx",
    identifier = "Hello.Strings.resources",
)

There a couple of things I'll mention here:

  • ResX files have a lot of cases that I think should be tested (multiple resx files, embedded files, identifier/out parameters, etc)
  • A target_framework is necessary for the csproj to compile

Resolves #10 , #77

@jrbeverly jrbeverly added the enhancement New feature or request label Oct 23, 2019
@jrbeverly jrbeverly self-assigned this Oct 23, 2019
Copy link
Contributor

@omsmith omsmith left a comment

Choose a reason for hiding this comment

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

Just cursory nits. Haven't dug into implementation too much yet.

examples/resgen/Strings.Designer.cs Show resolved Hide resolved
examples/resgen/BUILD Outdated Show resolved Hide resolved
csharp/private/rules/resgen.bzl Outdated Show resolved Hide resolved
@jrbeverly jrbeverly requested a review from omsmith December 5, 2019 19:49
@jrbeverly
Copy link
Contributor Author

jrbeverly commented Dec 5, 2019

I have simplified the work done down to two rules, and moved the C++ compilation wrapper into the bash wrapper. This wrapper doesn't have as much going on (besides the boilerplate runfiles code).

I did discover something while working on windows, and that is that there exists a segmentation fault in the dotnetw wrapper. So I'll creating an issue to try to resolve that. I suspect it is related to the dotnet_argv that are passed in from argv. I suspect it needs to be copied rather than just reference.

ping @j3parker @apriyadarsheeD2L

@j3parker
Copy link
Member

Sorry in the delay getting back to this, I'll go through it on the weekend when I have some quiet time :)

@jrbeverly
Copy link
Contributor Author

While doing the housekeeping on some of these PRs, I noticed that with the latest release of the dotnet SDK 3.1.100, it introduced the expectation for project.assets.json.

That was failing the resx compilation due to its usage of dotnet build. Based on a quick search, I suspect this'll impact the current implementation of resx.

@omsmith
Copy link
Contributor

omsmith commented Jan 10, 2020

:(

@jrbeverly jrbeverly closed this Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-platform resgen (.resx compilation)
3 participants