cmsis-pack-eclipse
cmsis-pack-eclipse copied to clipboard
*.rteconfig is not considered dirty when updating a pack
The *.rteconfig file is not considered dirty when updating the version of a pack in use. This creates a difference in the underlying model shown in the GUI and the file on disc.
To reproduce: Create a simple project using an outdated device package. Open the rteconfig editor and the pack view, and ensure that "Use latest package" in the Pack section in RTE editor. Update the device package to the latest, which will update the GUI but the *rteconfig stored on disc will still keep the old version.
BEFORE UPDATE:
AFTER UPDATE:
Debugging shows that the editor is only considered dirty if the set of components change, if the device is changed or if the pack filter is changed. The editor will not react to a change in the version of a used pack, which creates a discrepance between the model and the file on disc.
Dirty check is performed in RteModelController.java line 137 as:
@Override public boolean isModified() { return isDeviceModified() || isPackFilterModified() || isComponentSelectionModified(); }
That is correct behavior by design. A newer pack is installed, but there is no change in the *.rteconfig file itself. Pack information represents a hint which pack was used at the moment of device selection (similar for components). That information is only used when device (component) is not resolved and information is needed which pack used to have it.
That avoids an unnecessary noise in version control system. For instance imaging a situation when you might want to check if your project still works with a newer pack, install the pack temporarily and then uninstall it. The project should remain the same!
You need actively edit the *.rteconfig file in order to have newer pack information saved, e..g. select another device or configure it (chage FPU or endian)