Boo

Allow Compilation Process to Handle .resources Files With Stream-Based Resources

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 0.8, 0.8.1, 0.8.2, 0.9
  • Fix Version/s: 0.9.5
  • Component/s: Compiler
  • Labels:
    None
  • Environment:
    Boo 0.* on .NET 2.0+.
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

The following script demonstrates the problem with the System.Resources::ResourceReader and System.Resources::ResourceWriter included in the .NET 2.0+ Base Class Library:

{{import System}}
{{import System.IO}}
{{import System.Resources}}
{{import System.Text}}
{{using ms = MemoryStream(Encoding.UTF8.GetBytes("Parent, may I?")):}}
{{  using writer = ResourceWriter("mother-may-i.resources"):}}
    writer.AddResource("mami?", ms)
    writer.Close()
{{using writer = ResourceWriter("father-may-i.resources"):}}
{{  using reader = ResourceReader("mother-may-i.resources"):}}
    for res in reader:
      writer.AddResource("papi?", res.Value)
    reader.Close()
    writer.Close()

This means that, given any .resources file with a MemoryStream saved to it, the Boo compiler will fail because of code similar to this in the FileResource.cs of Boo.Lang.Compiler. The submitted patch allows for the Boo compiler to include the resources from such .resources files. For those that want to use Boo in their compiled XAML development, this functionality is necessary.

For further information regarding this issue, I've finished a thread on the BooLang group list at <http://groups.google.com/group/boolang/browse_frm/thread/7b244c6e6c3807e>.

Activity

Hide
Yury Korolev added a comment -

Must have patch .

Show
Yury Korolev added a comment - Must have patch .
Hide
Scott Parker added a comment -

Does anyone know the status of this issue? This patch looks to have been here for some time, and the issue is closing in on it's 1-year anniversary. =)

Any chance of seeing this in trunk? Just pulled the latest out of SVN and applied the above patch - it seems to correct the issue.

Show
Scott Parker added a comment - Does anyone know the status of this issue? This patch looks to have been here for some time, and the issue is closing in on it's 1-year anniversary. =) Any chance of seeing this in trunk? Just pulled the latest out of SVN and applied the above patch - it seems to correct the issue.
Hide
Curtis Schlak added a comment -

Scott,

I haven't received any communication regarding this patch since I created it a little over ten months ago.

Actually, none of my patches have made it into trunk, yet. I'm a Boo pariah.

Curtis.

Show
Curtis Schlak added a comment - Scott, I haven't received any communication regarding this patch since I created it a little over ten months ago. Actually, none of my patches have made it into trunk, yet. I'm a Boo pariah. Curtis.
Hide
Cedric Vivier added a comment -

>Actually, none of my patches have made it into trunk, yet. I'm a Boo pariah.

Eheh, actually yeah your patches completely slipped under the radar though they look completely worthy.
I feel guilty about it since I assigned BOO-1010 and BOO-1023 to myself and then forgot about it

Maybe it's time to add another pariah committer to the party, Rodrigo?
As long as you add testcases to any compiler patch (such as BOO-1023) and run the testsuite successfully (nant test) everything's fine I guess

Show
Cedric Vivier added a comment - >Actually, none of my patches have made it into trunk, yet. I'm a Boo pariah. Eheh, actually yeah your patches completely slipped under the radar though they look completely worthy. I feel guilty about it since I assigned BOO-1010 and BOO-1023 to myself and then forgot about it Maybe it's time to add another pariah committer to the party, Rodrigo? As long as you add testcases to any compiler patch (such as BOO-1023) and run the testsuite successfully (nant test) everything's fine I guess
Hide
Curtis Schlak added a comment -

I've seen the work that you've done on behalf of the Boo project and having some patches slip under the RADAR is completely understandable.

In response to your comment, I'd incorporate some new test cases and ensure everything lit up green. That's the only way to make open source work well, right?

As an avid fan of the language, I'd appreciate the chance to assist in its maintenance.

Show
Curtis Schlak added a comment - I've seen the work that you've done on behalf of the Boo project and having some patches slip under the RADAR is completely understandable. In response to your comment, I'd incorporate some new test cases and ensure everything lit up green. That's the only way to make open source work well, right? As an avid fan of the language, I'd appreciate the chance to assist in its maintenance.
Hide
Scott Parker added a comment -

+1 for Curtis becoming a committer on this project, mostly because I too want to try WPF tricks with Boo. =)

Either way, I 'm sure the Boo team will keep up the exemplary work.
-Scott

Show
Scott Parker added a comment - +1 for Curtis becoming a committer on this project, mostly because I too want to try WPF tricks with Boo. =) Either way, I 'm sure the Boo team will keep up the exemplary work. -Scott
Hide
Rodrigo B. de Oliveira added a comment -

Patch looks good.

Curtis, please apply to become a boo developer at http://xircles.codehaus.org/projects/boo/members so you can check it in.

Best wishes!

Show
Rodrigo B. de Oliveira added a comment - Patch looks good. Curtis, please apply to become a boo developer at http://xircles.codehaus.org/projects/boo/members so you can check it in. Best wishes!

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: