Coder Social home page Coder Social logo

Incremental build failed about bob HOT 5 CLOSED

bobbuildtool avatar bobbuildtool commented on July 17, 2024
Incremental build failed

from bob.

Comments (5)

rhubert avatar rhubert commented on July 17, 2024

I don't think this is a bug? After reverting the changes you can reuse the result from the first build and that's why bob doesn't need to execute build/package step.

from bob.

jkloetzke avatar jkloetzke commented on July 17, 2024

I thought the same but it is actually not true. When running the build step it could do a rm -rf as a first command. Then it fails and leaves no result in the work space. At step 3 Bob has to run the build step again or the package step will grab into the stale result from step 2.

from bob.

rhubert avatar rhubert commented on July 17, 2024

But the package step isn't executed in 3?

binary-repository $ bob dev root
>> root
>> root/lib
   DOWNLOAD  dev/dist/lib/1/workspace...[Errno 111] Connection refused
   CHECKOUT  dev/src/lib/1/workspace
   BUILD     dev/build/lib/1/workspace
   PACKAGE   dev/dist/lib/1/workspace
>> root
   CHECKOUT  dev/src/root/1/workspace
   BUILD     dev/build/root/1/workspace
   PACKAGE   dev/dist/root/1/workspace
Build result is in dev/dist/root/1/workspace

-> edit dev/src/lib/1/workspace/lib.c

binary-repository $ bob dev root>> root
>> root/lib
   CHECKOUT  skipped (fixed package dev/src/lib/1/workspace)
   BUILD     dev/build/lib/1/workspace
/home/biera/projects/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c: In function 'foo':
/home/biera/projects/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c:5:2: error: unknown type name 'p'
  p rintf("Hello world!\n");
  ^
/home/biera/projects/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c:5:10: error: expected declaration specifiers or '...' before string constant
  p rintf("Hello world!\n");
          ^
Step failed on line 17: Exit status 1; Command: gcc -c -o lib.o $1/lib.c
Build error: Build script ./dev/build/lib/1/build.sh returned with 1
Processing stack: root/lib
You may resume at this point with '--resume' after fixing the error.

revert

binary-repository $ bob dev root
>> root
>> root/lib
   CHECKOUT  skipped (fixed package dev/src/lib/1/workspace)
   BUILD     skipped (unchanged input for dev/build/lib/1/workspace)
   PACKAGE   skipped (unchanged input for dev/dist/lib/1/workspace)
>> root
   CHECKOUT  skipped (fixed package dev/src/root/1/workspace)
   BUILD     skipped (unchanged input for dev/build/root/1/workspace)
   PACKAGE   skipped (unchanged input for dev/dist/root/1/workspace)
Build result is in dev/dist/root/1/workspace

from bob.

jkloetzke avatar jkloetzke commented on July 17, 2024

Hmm, you're right. This simple example is not enough. Somehow it did run the package step when I encountered the problem today. 🤔

from bob.

jkloetzke avatar jkloetzke commented on July 17, 2024

I got a repro case though it was certainly not the one I had today:

  1. build
$ bob dev root
>> root
>> root/lib
   DOWNLOAD  dev/dist/lib/1/workspace...[Errno 111] Connection refused
   CHECKOUT  dev/src/lib/1/workspace
   BUILD     dev/build/lib/1/workspace
   PACKAGE   dev/dist/lib/1/workspace
>> root
   CHECKOUT  dev/src/root/1/workspace
   BUILD     dev/build/root/1/workspace
   PACKAGE   dev/dist/root/1/workspace
Build result is in dev/dist/root/1/workspace
  1. insert error in lib.c and rebuild clean:
$ bob dev root --clean
>> root
>> root/lib
   CHECKOUT  skipped (fixed package dev/src/lib/1/workspace)
   BUILD     dev/build/lib/1/workspace
/home/jkloetzke/src/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c: In function 'foo':
/home/jkloetzke/src/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c:5:2: error: unknown type name 'p'
  p rintf("Hello world!\n");
  ^
/home/jkloetzke/src/bob/bob-tutorials/binary-repository/dev/src/lib/1/workspace/lib.c:5:10: error: expected declaration specifiers or '...' before string constant
  p rintf("Hello world!\n");
          ^~~~~~~~~~~~~~~~
Step failed on line 17: Exit status 1; Command: gcc -c -o lib.o $1/lib.c
Build error: Build script ./dev/build/lib/1/build.sh returned with 1
Processing stack: root/lib
You may resume at this point with '--resume' after fixing the error.
  1. revert and change lib.yaml packageScript to force re-execution of package step:
$ bob dev root --clean
>> root
   PRUNE     dev/dist/root/1/workspace (recipe changed)
>> root/lib
   PRUNE     dev/dist/lib/1/workspace (recipe changed)
   DOWNLOAD  dev/dist/lib/1/workspace...[Errno 111] Connection refused
   CHECKOUT  skipped (fixed package dev/src/lib/1/workspace)
   BUILD     skipped (unchanged input for dev/build/lib/1/workspace)
   PACKAGE   dev/dist/lib/1/workspace
cp: cannot stat '/home/jkloetzke/src/bob/bob-tutorials/binary-repository/dev/build/lib/1/workspace/lib.o': No such file or directory
Step failed on line 17: Exit status 1; Command: cp -a $1/lib.o .
Build error: Build script ./dev/dist/lib/1/package.sh returned with 1
Processing stack: root/lib

from bob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.