Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: gmb300 on September 06, 2007, 09:34:29 am
-
Version: SVN 4420 (September 1, 2007)
OS: Linux
I am reporting 3 bugs in CodeBlocks, all are reproducable.
BUG #1
* When saving a workspace, the '.workspace' extension must be explicitly added.
BUG #2
* CodeBlocks only recognizes a workspace if it has the extension '.workspace'.
BUG #3 [SERIOUS]
* CodeBlocks erases project files without warning!
Steps to reproduce:
Deleted... See my next few posts.
-
1) fixed in rev 4428
2) not a bug
3) still looking
-
What about this thread (http://forums.codeblocks.org/index.php/topic,6119.0.html)? Will the extension be changed or does revision 4428 mean that it will remain ".workspace"?
-
I haven't changed anything to the extension as such (and won't for now).
Though I'm 100% for the change to .cbw, I don't want to tamper with extensions for now, as long as extension handling is OBUH (one big ugly hack). Actually I wouldn't have done revision 4428 either, since it adds another piece of hardcode... but it's such an obvious dumb mistake which will annoy users every time they encounter it, so it should be "fixed" nevertheless.
-
I've narrowed the steps down.
Deleted... See my next post.
-
I've narrowed the steps down.
This happens on Windows too (following the steps -> empty project)
/Troels
-
New Set of Steps to Reproduce
1). Open fresh codeblocks
2). File -> New -> Project
3). Create console application
4). Reasonable defaults are okay
5). Project -> Properties
6). Click Build Targets Tab
7). Set Type to 'Dynamic library'
8). Uncheck the box Auto-generate filename extension
9). Set Output Filename to 'bin/Debug/testcb.dll'
10). Click OK
11). File -> Save Project
12). Click 'Rebuild' on the toolbar
13). File -> Close Project
14). File -> Open ... The project file does not exist!
-
The problem is with Clean() ing, CodeBlocks thinks the project file is a static library. So C::B adds the project file to the list of files to be deleted.
Pseudo-Code:
if (project_target_type == ttDynamicLib &&
m_PrefixGenerationPolicy == tgfpPlatformDefault &&
m_ExtensionGenerationPolicy == tgfpNone)
then
call DirectCommands::GetTargetCleanCommands()
return List_of_Files_To_Be_Deleted(Object Files, Project File)
-
Bug confirmed. Thanks for the report. Hopefully we'll be able to fix this soon. :)
-
Fix committed in revision 4435. Thanks for pointing this nasty bug. :)