Change Warning into an error
7 posts • Page 1 of 1
Change Warning into an error
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
--
Dan
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
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
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.
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
Thanks Gael,
I'll submit feature request, and tell the guys to keep an eye open (and check the build logs
)
--
Dan
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
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
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
Interestingly adding the OnMethodInvocation aspect removes the warning, and causes a field set to be generated ..... ?
--
Dan
--
Dan
- ddignam
- Posts: 16
- Joined: Mon Apr 07, 2008 5:07 pm
- Full Name: Daniel Dignam
- Company: Solidworks
Re: Change Warning into an error
No idea. If you think there is a bug, please file a bug report with a repro case.
Thanks,
Gael
Thanks,
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
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
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
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
7 posts • Page 1 of 1