Change Warning into an error

Technical questions about PostSharp Laos.

Change Warning into an error

Postby ddignam on Sat Apr 26, 2008 10:49 pm

Hi Folks,

Is there any way for me to turn the following warning into an error so that things don't build. This will cause my aspects to not behave correctly. The asepct is being added by way of a compoundAspect

Code: Select all
postsharp warning PS0069: PostSharp: Cannot weave the initialization of the field AddValue.m_result, because it is initialized outside the constructor. The weaving of this field initialization will be ignored, but other field assignments will be woven.

--
Dan
ddignam
 
Posts: 16
Joined: Mon Apr 07, 2008 5:07 pm
Full Name: Daniel Dignam
Company: Solidworks

Re: Change Warning into an error

Postby gfraiteur on Sun Apr 27, 2008 8:18 am

No, it is not possible.

But you can submit a feature request in the issue tracker so that it will get considered for future versions.

Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
gfraiteur
Site Admin
 
Posts: 581
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org

Re: Change Warning into an error

Postby ddignam on Sun Apr 27, 2008 9:29 pm

Thanks Gael,

I'll submit feature request, and tell the guys to keep an eye open (and check the build logs ;-) )

--
Dan
ddignam
 
Posts: 16
Joined: Mon Apr 07, 2008 5:07 pm
Full Name: Daniel Dignam
Company: Solidworks

Re: Change Warning into an error

Postby ddignam on Mon Apr 28, 2008 10:09 am

I actually realized when I woke up in the middle of the night that I can hook the constructor and get the intial state of the fields there. This stuff is great ;-)

It might still be a good idea to have a change warnings into errors (in much the same way you can for the C# compiler on the project page)

--
Dan
ddignam
 
Posts: 16
Joined: Mon Apr 07, 2008 5:07 pm
Full Name: Daniel Dignam
Company: Solidworks

Re: Change Warning into an error

Postby ddignam on Wed Apr 30, 2008 3:09 pm

Interestingly adding the OnMethodInvocation aspect removes the warning, and causes a field set to be generated ..... ?

--
Dan
ddignam
 
Posts: 16
Joined: Mon Apr 07, 2008 5:07 pm
Full Name: Daniel Dignam
Company: Solidworks

Re: Change Warning into an error

Postby gfraiteur on Wed Apr 30, 2008 3:14 pm

No idea. If you think there is a bug, please file a bug report with a repro case.

Thanks,

Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
gfraiteur
Site Admin
 
Posts: 581
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org

Re: Change Warning into an error

Postby ddignam on Thu May 01, 2008 10:24 am

Hi Gael,

I've submitted issue 209 with an example solution. I must admit I like the behaviour. However, if adding an OnMethodInvocationAspect to a constructor allows the field to be woven, the PS0069 warning would appear to be fixable ?

--
Dan
ddignam
 
Posts: 16
Joined: Mon Apr 07, 2008 5:07 pm
Full Name: Daniel Dignam
Company: Solidworks


Return to PostSharp Laos