Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Changing build options, should force a rebuild
Game_Ender:
I disagree MortenMacFly. I use Xcode on a daily basis and if you change any options that would in effect change the compiler command line generated your entire project is rebuilt. That is how it should be because if you don't you will get all sorts of strange errors and it will probably take you a little while to track them down. So this is all ready done in an a widely used industry IDE so its not out of the question.
You argument about it being the developer responsibility is weak. The IDE exist to remove developer responsibility and make it easier to develop. After all, why use an IDE or dependency system at all. The developer knows when changes to a file and therefore he just build the ones that depend on it, shouldn't he? Yet CB does because it is error prone and easy to get wrong if you do it by hand.
Your are correct that an ideal implementation would be difficult, so don't use the ideal one. You use a more broad approach. I think a good way to implement this feature would be through another "Annoying Dialog" which would say:
"You have changed the build options of you project. If you compile some files with these options and try to link object files compiled with the previous there is a likelihood of strange linker and program errors. Would you like to do a full rebuild now?".
This would be triggered every time you change a build option to your project. For even better control it should rebuild the entire project if you change a project or compiler option, but only a target if you change a targets options. That would be pretty easy to do.
BTW: Aren't we trying to be better than make? ;)
EDIT: lw2nhl- you can generate dependicies in make to make sure it rebuilds when you change header files. Its not easy but it can be done and can be automated.
MortenMacFly:
--- Quote from: iw2nhl on July 18, 2006, 03:42:54 pm ---I know this problem, but there is a very simple solution:
--- End quote ---
Again: I don't think so. Let me give you an example: If I turn off a compiler warning level, why should all files be marked as dirty then? And in fact that time I dont want to do a re-build!
--- Quote from: iw2nhl on July 18, 2006, 03:42:54 pm ---This is what is done by other IDEs (e.g.: VS6).
--- End quote ---
I'm using VS6. Of course this can be done here (btw: limited!). But this applies to only one compiler and is neighter backward nor forward compatible. C::B supports more than one compiler.
--- Quote from: iw2nhl on July 18, 2006, 03:42:54 pm ---Yes, for my point of view this is a bug.
--- End quote ---
Well, I'd say for many people (including me) it isn't Who is right?
Again: You know for sure when you have to do a re-build. So why don't you press re-build? This I don't get...?!
With regards, Morten.
MortenMacFly:
--- Quote from: Game_Ender on July 18, 2006, 03:50:24 pm ---I use Xcode [...]
--- End quote ---
Does Xcode support more than one compiler?
I use the QNX plugin for Eclipse to develop a real-time application. There it is the same and this drives me crazy: If I setup the project dependencies as they should be, nearly always there is done a full re-build. A re-build means in my case: Compile about 400 source code files distributed over several libs. I believe this is a serious bug in the dependeny sytem but it does't get fixed.
In the end: I agree that this is possible. But I believe that this is going to be really complex and error-prone. Whoever maintains this has a full-time job. Think about that (s)he has to know all compilers C::B supports and will support in the future. And that's not all (s)he should also know all compiler versions C::B can be used with.
I could imagine that this can be done on a plugin-basis. After a quick check I think all required functions are exported. So if someone has the time to give it a try - feel free! And if you have a simple solution to this problem - step forward. But again: Keep in mind the example with the compiler warning levels being changed. I never-ever will have to do a re-build if I change such an option and don't press re-build.
With regards, Morten.
Game_Ender:
You aren't listening or I am not being clear. Don't try and do any magic at all! Just ask the user if they want a full rebuild after they change the build options and make it an annoying dialog. After all CB does currently warn that a full rebuild takes a long time, which is basically a bigger "duh" for a developer than this current issue.
MortenMacFly:
--- Quote from: Game_Ender on July 18, 2006, 04:13:31 pm ---Just ask the user if they want a full rebuild after they change the build options [...]
--- End quote ---
What build options? If I change the global compiler options a full re-build of all projects in the workspace (and future workspaces I open later) should be performed. Thus if I open another workspace after having changed this I should also be asked like that.
If I change the project's compiler options all targets of this very project should be re-build. But: Imagine I have overridden compiler options in the target that will lead to the fact that a target does't have to be re-build because it's (local) options haven't changed at all. Thus to make it a help for the developer such dependencies should be considered. Otherwise I still have to think for myself if to re-build or not.
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version