After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655295 - Add Target in Vala project does nothing.
Add Target in Vala project does nothing.
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: project-manager
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-25 23:10 UTC by bsquared
Modified: 2011-09-05 20:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description bsquared 2011-07-25 23:10:16 UTC
I have tried adding a new target to a project using the context menu
 in the project tab, but nothing was added.

 From project tab, Rt. Click on src folder, Select New Target;
 Enter new target name (lib_test), Select target type (Shared Library),
 Choose location (src), click Ok.
 No changes.

 I have tried the same after creating a new directory (src/lib_test) in
 project manager, and the result is same.
Comment 1 Sébastien Granjoux 2011-07-26 09:10:37 UTC
Thanks for reporting this bug.

It can work if you give a valid library name, it should start with lib and have the .la extension.

So I need to fix two issues here. First you should see an error message in this case, then if the name is invalid it would be better to add the missing parts.
Comment 2 bsquared 2011-07-26 14:57:56 UTC
> It can work if you give a valid library name, it should start with lib and have
> the .la extension.

I tried this and it did work (yea)

This bug report came about as a result of the following question on the Anjuta mailing list.

> I generally want to have multiple targets in a Vala project.
> 
> For example, an executable, one or more libraries and test cases that
> run with make check.
> 
> Can I automate this when creating a new project.

So what is the procedure for creating the different target types? i.e.
programs, libraries (answered) and tests to be run in make check.  

I simply tried 'New Target' changed the type to 'Program' entered 'tests' for name and selected a target folder.

Thank you.
Comment 3 Sébastien Granjoux 2011-07-26 16:46:41 UTC
(In reply to comment #2)
> > I generally want to have multiple targets in a Vala project.
> > For example, an executable, one or more libraries and test cases that
> > run with make check.
> > Can I automate this when creating a new project.

I think it's better to keep the project wizard template as simple as simple. My goal is even to remove some options from the current templates. But it's more difficult to implement this in the project manager, so I keep them in the project wizard for the moment.

> So what is the procedure for creating the different target types? i.e.
> programs, libraries (answered) and tests to be run in make check.  
> 
> I simply tried 'New Target' changed the type to 'Program' entered 'tests' for
> name and selected a target folder.

That's the procedure for creating a new program. For a test program, you can change the target property to not install it, is there something else to do?
Comment 4 bsquared 2011-07-26 18:49:48 UTC
(In reply to comment #3)
> > I simply tried 'New Target' changed the type to 'Program' entered 'tests' for
> > name and selected a target folder.
> 

I was not clear enough about this item I think.  When I did this no target was created.


Thank you.
Comment 5 bsquared 2011-07-26 18:59:02 UTC
(In reply to comment #3)
> That's the procedure for creating a new program. For a test program, you can
> change the target property to not install it, is there something else to do?

I am not sure if it's the same or not.  I meant the result of running 'make check'.
Comment 6 Sébastien Granjoux 2011-07-29 14:36:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
>> I simply tried 'New Target' changed the type to 'Program' entered 'tests'
>> for name and selected a target folder.
> I was not clear enough about this item I think.  When I did this no target was
> created.

I have tried here and I get a target created which is only one additional name in src/Makefile.am in bin_PROGRAMS variable.

Could you check that you have selected a group? Then which version of Anjuta are you using? Could you try to use the latest version from git? (you need to recompile it)
Comment 7 Sébastien Granjoux 2011-07-29 14:40:41 UTC
(In reply to comment #5)
> I am not sure if it's the same or not.  I meant the result of running 'make
> check'.

I don't know how it's working myself. I have used it in one plugin using the autotest tools but it's not necessary. Anyway, the autotools backend doesn't support it at the moment. I will try to add it but later when the basic functions will work without any issues.
Comment 8 bsquared 2011-07-29 15:28:27 UTC
(In reply to comment #7)
> I don't know how it's working myself. I have used it in one plugin using the
> autotest tools but it's not necessary. Anyway, the autotools backend doesn't
> support it at the moment. I will try to add it but later when the basic
> functions will work without any issues.
Thank you, I am still trying to figure it out.  Unfortunately documentation seems to be sparse.
Comment 9 bsquared 2011-07-29 15:38:20 UTC
(In reply to comment #6)
> Could you check that you have selected a group? Then which version of Anjuta
> are you using? Could you try to use the latest version from git? (you need to
> recompile it)

Using 3.1.3

I tried again and it was successful.  I'm not sure what is different, but I cannot get it to fail.

I tried with a new project and an imported project.

Thank you.
Comment 10 Sébastien Granjoux 2011-09-05 20:43:33 UTC
I have fixed a bug explaining why the error message is not displayed.

It would be probably better to generate a valid name but at least the error message is quite explicit.