Bug 214207 - project conversion is not run
Summary: project conversion is not run
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-03 03:47 EST by Irit Belezko CLA
Modified: 2020-09-04 15:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Irit Belezko CLA 2008-01-03 03:47:15 EST
Build ID: M20071205-0800

Steps To Reproduce:
1. define convertToId field in "source" projectType as "target" projectType Id
2. define converter with extension point org.eclipse.cdt.managedbuilder.core.projectConverter
 - set mbsVersion field for the converter to 4.0.0

==> as a result when project with mbsVersion 3.1.0 is imported, the converter is run. However, when project with mbsVersion 4.0.0 is imported, the converter is not run.

I have observed that converter is correctly extracted from ProjectType.getConverter(String convertToId) in both cases, but the conversion is not triggered for project with mbsVersion 4.0.0.
Comment 1 Torkild Resheim CLA 2008-04-17 02:57:16 EDT
I can confirm this issue. Did you find a workaround Irit?
Comment 2 Irit Belezko CLA 2008-04-17 03:13:31 EDT
No, I didn't.
Comment 3 James Blackburn CLA 2008-11-13 05:13:03 EST
(In reply to comment #0)
> Build ID: M20071205-0800
> 
> Steps To Reproduce:
> 1. define convertToId field in "source" projectType as "target" projectType Id
> 2. define converter with extension point
> org.eclipse.cdt.managedbuilder.core.projectConverter
>  - set mbsVersion field for the converter to 4.0.0
> 
> ==> as a result when project with mbsVersion 3.1.0 is imported, the converter
> is run. However, when project with mbsVersion 4.0.0 is imported, the converter
> is not run.

Why would you expect the converter defined for mbsVersion 4.0.0 to be run when a project with version already set to 4.0.0 is opened?  As I understand it the converter is defined to convert old versions of the toolchain to newer versions, as well as allow converting between toolchain types.
Comment 4 Torkild Resheim CLA 2008-11-13 16:05:44 EST
I gather that the mbsVersion is the version of the build system (framework), not the toolchain. The toolchain version is specified using the project type identifier by appending "_<major>.<minor>.<patch>". For instance:

		<projectType buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
			id="avr32linux.managedbuild.target.gnu.exe_2.1.0" isAbstract="false"
			isTest="false" name="AVR32 Linux Executable">
			....
		</projectType>
		
So when I want to deprecate for instance 2.0.0 and replace it with 2.1.0 I also declare the 2.0.0. toolchain as:

		<projectType convertToId="avr32linux.managedbuild.target.gnu.exe_2.1.0"
			id="avr32linux.managedbuild.target.gnu.exe_2.0.0" isAbstract="true"
			name="AVR32 Linux Executable 2.0.0 [Obsolete]">
		</projectType>

Then I add a project converter using the "org.eclipse.cdt.managedbuilder.core.projectConverter" that does the actual conversion. This is automatically executed when converting from an older MBS version but has to be called manually when the MBS version is the same.
Comment 5 Torkild Resheim CLA 2008-11-13 16:44:35 EST
As a side note: The "funny" version number specification is not our invention. It's designed into the MBS.