Comments (4)
@niklasnisbeth your memory is pretty correct!
However, there are times where its not smart enough, and you just need to start over to ensure that things get built properly. I am totally open to discussing this though considering I too have been bit by it. Make a tiny change, massive rebuild, sadness.
Things to Consider
- Changes to dependencies in the parent project.
For example,nerves_system_br
gets updated, or, the package containing the defconfig and related files gets updated.
I think in this scenerio a full rebuild is required.
- Changes to files within the system like defconfig or kernel config
Here we could employ a default strategy to attempt to call make and not force a full rebuild. We would also want to add some API commands that allow you to force the full rebuild, but, maybe mix clean
could handle that if we shim it.
What we currently do
The problem actually stems from the way we determine if the build needs to happen again, and where the files for the build are stored. Currently, we determine if the source files have diverged from the build product by means of hashing the hashes of all the files tracked in the checksum
files list declared in the Nerves package config. here is an example of which from nerves_system_rpi3
https://github.com/nerves-project/nerves_system_rpi3/blob/master/nerves.exs#L21-L30
The overall hash of the hashes (the checksum) is then placed in the artifact in a file CHECKSUM
. Whenever a mix compile
is called, these values are compared and if they do not match, the nerves_package
compiler is invoked for the package.
When using the docker provider, we use the checksum as part of the name of the container so we can have a way of linking build environments to source files. This is where we need to have part of the discussion. There are problems with the current setup like wasted containers and space. Clean up is inevitably needed and currently unhandled.
@GregMefford @tmecklem Chime in if you have ideas for how to better checksums with docker containers but still allow partial rebuilds.
from nerves.
I think we need to rework the way the Docker build system works because I agree that it's messy and prone to error/confusion. One ides is to just have one container for Nerves builds and just manage all the build directories in there, syncing the source files over and running make just like you would if you were in a Linux environment. Then, like you said, we'd need a command to make it easy to proxy a make clean
into the appropriate directory within the container for when you want to do a full re-build.
This is on my list of things I'd like to give some attention to when I can free up some time to work on it.
from nerves.
This has been fixed in nerves 0.6.0. Docker containers will no longer trigger full builds and you can clean them using mix nerves.clean
Let us know if you have any issues with it. :)
from nerves.
Also fixed for Linux by #148, which will be released in the next version of Nerves. Sorry we missed that change when building directly on Linux.
from nerves.
Related Issues (20)
- Google linked project web page routes to 404 HOT 1
- Fix JSON handling HOT 1
- Broken packages in Nix-shell file HOT 3
- firmware.patch should handle FAT resources delta updates
- minor issues with FAQ.md HOT 3
- Help Mod bus, TCP/IP HOT 1
- Hardcoded check for GNU Coreutils on MacOS HOT 3
- Elixir 1.15 / OTP 26 support
- `mix firmware` failure during squashfs HOT 9
- Provide more helpful script output with `mix firmware` task errors
- Contributing link in readme is broken
- Formatting in installation instructions are unclear HOT 1
- Failure entering the nerves.system.shell using erlang 26.0.2 HOT 2
- Update Dependabot settings and CI auto merge
- nerves.system.shell information out of order HOT 1
- Documentation outline improvements
- Running `mix compile.nerves_package` crashes HOT 3
- Broken links in hex documentation HOT 1
- Discourage mktemp usage HOT 1
- Load Nerves.Runtime.KV in runtime.exs crashes system HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerves.