ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felder, Brian" <>
Subject RE: Optional task: Visual Basic.NET compile
Date Fri, 06 Sep 2002 21:56:55 GMT
Here is another snapshot of my work on the VisualBasicCompile task.
Here is what I have included:

-  A new class, DotnetCompile, now includes all options common to one
   or more of the dotnet compilers.
-  VisualBasicCompile and CSharp now recognizes only options that are
   valid for their respective compilers. (The version I sent on 
	Wednesday allowed some invalid options to be sent to the VB
- now includes a test case for VisualBasicCompile
   (defined in WsdlToDotnet.xml).
- now includes a line defining vbc as a task.
-  dotnet.html includes documentation for the VBC task.
-  WHATSNEW has a line added for the VisualBasicCompile task.

All relevant files are attached. Let me know if there is anything
else required.

Brian Felder

-----Original Message-----
From: Felder, Brian 
Sent: Wednesday, September 04, 2002 4:28 PM
To: 'Ant Developers List'
Subject: RE: Optional task: Visual Basic.NET compile

Here is a first cut of the DotnetCompile abstract class, with
VisualBasicCompile and CSharp extending them. Much of the code in
DotnetCompile was copied verbatim from Steve Loughran's CSharp task.

I kept the execute() method as abstract and implemented in the 
subclasses, though there is a lot of duplicated code here. There's
probably some way to abstract out the common functionality here and
allowing each subclass to define only their compiler options -- but
this works for now.

I have not made any enhancements to the code since this morning; only
refactorings. All tests still pass, as before.

I hope to add the documentation soon.


-----Original Message-----
From: Steve Loughran []
Sent: Wednesday, September 04, 2002 10:55 AM
To: Ant Developers List
Subject: Re: Optional task: Visual Basic.NET compile

wow, you have been busy. I am impressed.

docwise, the dotnet html file and \WHATSNEW are the two to change.

source-wise, tabs are forbidden in the sun coding rules; you need to replace
them with spaces. Everything else looks ok, though it is interesting to see
that references are different. Some time this cycle I want to change how we
do references; ideally we'd pull ant-contribs <cc> task into our codebase,
then the .net tasks can reuse the library and defines datatypes they have
for references and defintions. But that is further out. Short term I'd like
the C# reference list and the VB one to be unified somehow -we could keep
them in an array and then build the appropriate lists on demand. That would
work for J# too, I guess.

code committing wise, I'd rather wait for the refactoring, so it is cleaner.
But I can see that wont take long at your current rate of coding.


----- Original Message -----
From: "Felder, Brian" <>
To: "'Ant Developers List'" <>
Sent: Wednesday, September 04, 2002 9:58 AM
Subject: RE: Optional task: Visual Basic.NET compile

> I have added some tests for the VisualBasicCompile task in the attached
> files. I modified the following files (based on the nightly build from
> 9/3/2002):
> -  src/main/org/apache/tools/ant/taskdefs/
>    -  Added line for vbc optional task.
> -
> va
>    -  Modified to comply with changes from 1.5 to current nightly build.
> -
> src/testcases/org/apache/tools/ant/taskdefs/optional/
>    -  Modified to include calls to VB test cases.
> -  src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml
>    -  Added targets for VB test cases.
> When I do an "ant run-single-test" with the property set in build.xml:
> <property name="testcase"
> value=""/>
> The VB tests run and succeed.
> Since I'm new to the Ant source base, I'm not sure if there are any
> other relevant files that are required for the tests. Also, for the
> documentation, do I modify the file at
> docs/manual/OptionalTasks/dotnet.html? Are there any other issues I
> should be aware of when submitting source?
> This version does not yet include any refactoring to abstract out a
> "DotNetCompile" superclass. Nor does it test all of the compile options
> unique to VB.NET.
> Brian
> -----Original Message-----
> From: Steve Loughran []
> Sent: Tuesday, September 03, 2002 1:03 PM
> To: Ant Developers List
> Subject: Re: Optional task: Visual Basic.NET compile
> Brian,
> you are right, a common base class shared by C3, and J# would be
> best action. And yes, if you were to do it, it would be useful -but dont
> forget the tests and the documentation. Ant's unit tests do probe for csc
> being present and then <wsdltodotnet> and <csc> get stressed; we should
> test the <wsdltodotnet> Vb output and VB compiler the same way.
> -steve
> ----- Original Message -----
> From: "Felder, Brian" <>
> To: <>
> Sent: Monday, September 02, 2002 1:50 PM
> Subject: Optional task: Visual Basic.NET compile
> > In our environment, in addition to Java code, we have C# and VB.NET
> > code that we need to include in our builds. I have used the CSharp
> > compiler optional task, but have not found a task to call the VB.NET
> > compiler. Attached is a simple, initial cut at a VB.NET compilation
> > task; it is a trivial extension to the CSharp optional .NET task.
> > Although I have not tried it with complicated builds, it seems to work
> > well with some simple cases I have tried so far.
> >
> > The extension involves extending the CSharp task in the following ways:
> >
> > o Changing the compiler name and file extension
> > o Changing the file separator in the DEFAULT_REFERENCE_LIST from
> >   semicolons to commas
> > o Overriding getDefaultReferenceParameter() (which uses the
> > o Overriding getSrcDir(), in order to be able to set the _srcDir
> >   in the VisualBasicCompile class
> > o In the execute() method, removing some of the compiler options
> >   that do not work in VB
> >
> > Since there is so much common functionality between VB.NET and C#
> > compilation, it seems it would make sense to derive both from a common
> > superclass, rather than extending one from the other (as I have done).
> >
> > I'm not sure if this is the appropriate forum for submitting code;
> > please let me know if there is another place for this. Also, I would
> > be glad to help refactor this and the CSharp task to derive from a
> > common superclass, if this would make sense.
> >
> > Thank you,
> > ----
> > Brian Felder
> > Software Engineer
> > Providence Health System
> >
> > 503.216.2433
> >
> >

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very

View raw message