Bug 562019 - Regression: Executing a launch edits the *.launch
Summary: Regression: Executing a launch edits the *.launch
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.15   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-11 09:15 EDT by Ed Willink CLA
Modified: 2022-11-23 04:16 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2020-04-11 09:15:31 EDT
In 4.15 executing a longstanding launch changes the *.launch file e.g. it adds:

<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="org.eclipse.ocl.examples.build"/>

While it may be appropriate for the launch loader to upgrade old launch files, it is not permitted for the chanage to be written back to disk provoking a GIT chnage that may not be appropriate for the user's other needs.

Editing a *.launch is performed using an editor, e.g. the launch dialog. Launching itself is not an edit operation.
Comment 1 Sarika Sinha CLA 2020-04-22 03:15:23 EDT
I don't think we can do much about this, the code to save the tabs has been there since starting, and user can choose to reject the change if they are not interested. Addition of new attributes might be required for few cases which will lead to these changes but they are not common and doesn't happen in years.
Comment 2 Ed Willink CLA 2020-04-22 15:21:48 EDT
It's a regression. Revert the bad 'improvment'.

I check out a known state. I run the tests. Oops I need to check something in.

Running a test must not corrupt the checked out files.
Comment 3 Dennis Hendriks CLA 2020-06-05 06:08:05 EDT
I've recently been having a similar issue.

Steps:
 - I launch an Eclipse runtime instance using an 'Eclipse Application' launch configuration.
 - I restart the runtime instance using File -> Restart.

I then observe the following gets added to the launch configuration file:

<booleanAttribute key="restart" value="true"/>

I don't know what this 'restart' attribute does. I don't know whether to commit this change to Git or not. I do know I don't like to have to revert this change regularly.

If I edit the launch configuration using the Run Configurations dialog, this doesn't get added.