bugGNU gettext - Bugs: bug #41766, Add --sources-only option to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #41766: Add --sources-only option to msgfmt to output .java files

Submitted by:  None
Submitted on:  Mon 03 Mar 2014 03:27:23 PM UTC  
 
Category: JavaSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Wed 26 Mar 2014 03:20:53 AM UTC, comment #5:

Pushed as http://git.savannah.gnu.org/cgit/gettext.git/commit/?h=maint&id=75638a4cd22832f58d368e0316dc1c0a4598bbbf

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Tue 25 Mar 2014 10:16:30 AM UTC, comment #4:

I agree with all the changes, the many checks for sources_only made the code hard to read, and renaming to --source-only makes sense.

Thanks!

Aurelien Gateau <agateau>
Tue 25 Mar 2014 09:56:08 AM UTC, comment #3:

Maybe your system doesn't support delete-on-close flag?

Anyway, some minor nits:

- given so many checks of !sources_only, perhaps better consolidate the code into a single block
- as msgfmt produces only one .java source file, --source-only (not plural) or --source might be a better name?

I'm attaching a slightly modified patch. I think copyright assignment is not needed since the most part is copied from the original code. Will push it with your name, if there's no problem.

(file #31031)

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Sat 22 Mar 2014 11:19:51 PM UTC, comment #2:

(Sorry for the late answer)

I just had a look at it. Using fopen_temp() for something which is not temporary does not look harmful, but it sure feels wrong. New patch addresses this by introducing source_fopen and source_fwriteerror function pointers, which are set to either fopen+fwriteerror or fopen_temp+fwriteerror_temp, depending on whether user wants compiled output or not.

(file #31006)

Aurelien Gateau <agateau>
Tue 04 Mar 2014 02:53:09 AM UTC, comment #1:

The patch looks basically good. Thanks. One thing, maybe you need to avoid fopen_temp to make sure generated source files won't be deleted on fclose? Or, perhaps it might be more convenient not to create subdirs if --sources-only is given.

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Mon 03 Mar 2014 03:27:23 PM UTC, original submission:

Attached patch adds a --sources-only option to msgfmt. When compiling .po files for Java with this flag, msgfmt outputs the source of the code it generates instead of generating it in a temp dir and outputting the compiled .class file.

This is useful for me because I could not get compiled .class files to integrate properly with my LibGDX-based project (the .class files were being ignored by the Android sub-project).

Anonymous

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by agateau (Updated the item)
  • -unavailable- added by ueno (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 11:44:36 AM UTChaibleCategoryNone=>Java
      Assigned toNone=>ueno
    Wed 26 Mar 2014 03:20:53 AM UTCuenoStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 25 Mar 2014 09:56:08 AM UTCuenoAttached File-=>Added 0001-Add-source-only-option-to-avoid-compiling-the-Java-c.patch, #31031
    Sat 22 Mar 2014 11:19:51 PM UTCagateauAttached File-=>Added 0001-Add-a-sources-only-option-to-avoid-compiling-the-Jav.patch, #31006
    Mon 03 Mar 2014 03:27:23 PM UTCNoneAttached File-=>Added 0001-Add-a-sources-only-option-to-avoid-compiling-the-Jav.patch, #30762

    Back to the top


    Powered by Savane 3.1-cleanup1