136
votes
Accepted
What is the purpose of a dedicated build machine?
Normally you wouldn't just have a dedicated build machine, but also run a build server on that dedicated machine. A dedicated build machine merely offers the advantage of never blocking the work of a ...
107
votes
What is the purpose of a dedicated build machine?
In addition to Traubenfuchs' answer, you have hinted at another reason for a build machine in your question.
Just because the software builds on your machine, it doesn't mean that it will build on ...
95
votes
Detect manual changes to an autogenerated C header
I think you are approaching this problem from the wrong angle.
Better let the generator place a clear and visible comment at the beginning of the C header file like
// This file is autogenerated, ...
71
votes
What are the benefits of multi-file programming?
There are a lot of technical reasons behind using multiple files when writing large complex systems. All of them are meaningless in the face of the best reason to use multiple files:
Readability.
...
54
votes
What is the purpose of a dedicated build machine?
The main reason for having a dedicated build machine is to get consistent builds regardless of who is doing the build. Developer workstations are rarely (read: never) identical. It's hard to know ...
41
votes
Detect manual changes to an autogenerated C header
Don't commit the generated C header file at all. In fact, delete the current file (thanks @user1936), change the script to call the header file .g.h (thanks @davidbak),
and add it to .gitignore, so ...
28
votes
What are the benefits of multi-file programming?
The question falls into same category as why buildings are not build from one piece of rock but a bunch of bricks?
Answer:
easier to navigate than scroll through one huge file
make recompile works ...
21
votes
What are the benefits of multi-file programming?
The other answers are fine, but something they're missing is actual technical limitations.
For example, you can't actually save all of the code for my day-job application in one file - it's bigger ...
21
votes
How can we avoid showing the literal path in the exception's stack trace?
Couple of pointers.
You should never expose stacktrace to users. Thats a security risk. You should also never expose exception messages to users, only for custom exceptions that you know can not ...
19
votes
What is the purpose of a dedicated build machine?
The other answers quite correctly noted that you should automate the build, which means it isn't necessary to walk to another office. However, let me propose a certain number of steps you could take ...
17
votes
Accepted
In-Source Build vs. Out-Of-Source Build
After asking the community here and continuing my search online, I have not been able to find significant engineering justification for using in-source builds. (There are many examples of reasons to ...
17
votes
Detect manual changes to an autogenerated C header
First a disclaimer: I don't think this is a good idea.
But here is one way to do it anyway:
void check_file_time() {
if (strcmp(__TIMESTAMP__, "Sun Feb 16 19:38:35 2020") != 0)
{
asm(...
16
votes
What is the purpose of a dedicated build machine?
... instead of getting an actual machine in our office to use, we're having to share a single machine with several other groups ...
You say that like it's a bad thing.
You now have a common build ...
13
votes
Accepted
Redundant code sent down the pipe with Micro-frontends
You're absolutely correct that there's a tradeoff involved here: you are trading in some aspects of the user experience to get a better developer experience (which in turn might improve the user ...
11
votes
What are the benefits of multi-file programming?
I have been told to write large applications in several different files. They say it will run faster. What makes it run faster?
Also does a multifile application ACTUALLY run faster than a singlefile ...
10
votes
Accepted
What does it mean to build from source?
If I'm not wrong, to "build" generally means to compile files into machine readable ones and then group them into an executable.
Basically yes, though the term is a lot more general than that. For ...
9
votes
How can we avoid showing the literal path in the exception's stack trace?
From this blog:
<PropertyGroup>
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
</PropertyGroup>
So instead of this:
Unhandled ...
8
votes
Accepted
Why incremental builds in "make" don't use hashing algorithms?
An obvious (and arguably superficial) problem would be that the build system would have to keep record of the hashes of the files that were used for the last build. While this problem could certainly ...
8
votes
Does the Scrum Guide Specify How Often to Release QA/Test Builds?
No it does not. Only thing it states that at end of sprint, Potentially Releasable Product Increment is produced.
And general consensus of "Potentially Releasable" is that it does include it being ...
7
votes
how to improve build stability in a team
As you already have notifications of failed builds, getting them fixed is primarily a people problem.
You should get agreement among the team members that a broken build is a serious problem that ...
7
votes
Accepted
What is the purpose of build for language like PHP?
It depends on what you actually call "Build", especially when you say "Continuous Build".
If one defines "Build" in the narrow sense of compiling some source code into a binary executable, then you ...
7
votes
Solutions for preventing build breakage
You need a build before you can break it. You're already using Jenkins? Great! Now add a Linux box as a build slave, and create a build for Linux that mirrors your Windows builds.
Note that your ...
7
votes
Accepted
Detect manual changes to an autogenerated C header
Does GCC have any facilities I can use for this kind of thing?
Not that I am aware of such feature.
But you could do something like generating a MD5 checksum after you generated the header file and ...
7
votes
Should a large number of system tests be part of the build?
The tests and the build
The concept of having extensive tests as part of the build is not flawed. This is actually what the build is for. What is flawed is to have tests “that fail frequently but ...
6
votes
Is it good practice to check in updated assemblyinfo.cs files after build
One of the big risks with letting your build server commit changes to your version control is that it is very easy to create an unintended feedback loop.
It is often desirable that a commit to (trunk ...
6
votes
Why incremental builds in "make" don't use hashing algorithms?
A few points about hashes vs timestamps in build-systems:
When you checkout a file, the timestamp should be updated to the current time, which triggers a rebuild. What your colleague describes is not ...
6
votes
Accepted
Should automated unit tests be part of the build?
Disclaimer: I'm not a purist regarding testing. I like to do my TDD, but I don't think 100% coverage is necessary for all projects.
That being said, the rule of thumb should be "every change must be ...
6
votes
How can we avoid showing the literal path in the exception's stack trace?
The build property or rather msbuild parameter is /pathmap or <PathMap>.
It will rewrite all traces to your source locations.
Unfortunately i wasnt able to find the perfect documentation for ...
6
votes
Detect manual changes to an autogenerated C header
I've worked in a bunch of codebases with large quantities of auto-generated code. The amount of issues raised by folks modifying these files has been quite low, and usually quick to spot and quick to ...
5
votes
How to properly manage dependencies for C/C++ project?
Do you really need to always use an exact version of a dependent library? Is it badly written/does it break it's API with every minor increase in version?
If you look at open-source projects, their ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
builds × 176continuous-integration × 32
c++ × 19
version-control × 17
deployment × 12
maven × 12
build-system × 12
java × 10
c × 10
automation × 10
versioning × 8
make × 8
c# × 7
testing × 7
git × 7
development-process × 7
visual-studio × 7
design × 6
release-management × 6
release × 6
cmake × 6
javascript × 5
python × 5
.net × 5
team-foundation-server × 5