Re: [cmake-developers] Toward a more deterministic ninja generator

2016-06-17 Thread Nicolas Desprès
On Thu, Jun 16, 2016 at 7:14 PM, Brad King  wrote:

> On 06/14/2016 11:18 AM, Nicolas Desprès wrote:
> > It makes the ninja generator more deterministic by sorting the
> > build edge's inputs/outputs. It does not introduce any
> > regression on my macbookpro.
> >
> > This could help to fix issue #15968.
>
> What examples of non-determinism have you observed after the changes
> already made for that issue?
>

The LINK_LIBRARIES list has not the same order for an executable target.  I
have that after the 79th generation using cmake 3.5.2. With cmake master
(d4283ca18b7) I did not reproduce it after 100 tries.


> >  + // We assume that commands using $in and $out varialbes do not care
> >  + // about the order of their inputs/outputs files, but commands that do
> >  + // not use them do care (like custom commands for instance).
>
> I'd prefer not to make this assumption.  CMake should order the
> inputs and outputs in a deterministic way before getting to the
> code in question.  If that is not happening then there may be
> a deeper problem.  Sorting this late is fixing the symptom.
>
>
Yes you are right.

I did not took enough time to read the issue history and I did not test
with master.

Sorry for the noise.

-- 
Nicolas Desprès
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Toward a more deterministic ninja generator

2016-06-16 Thread Brad King
On 06/14/2016 11:18 AM, Nicolas Desprès wrote:
> It makes the ninja generator more deterministic by sorting the
> build edge's inputs/outputs. It does not introduce any
> regression on my macbookpro.
> 
> This could help to fix issue #15968.

What examples of non-determinism have you observed after the changes
already made for that issue?

>  + // We assume that commands using $in and $out varialbes do not care
>  + // about the order of their inputs/outputs files, but commands that do
>  + // not use them do care (like custom commands for instance).

I'd prefer not to make this assumption.  CMake should order the
inputs and outputs in a deterministic way before getting to the
code in question.  If that is not happening then there may be
a deeper problem.  Sorting this late is fixing the symptom.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Toward a more deterministic ninja generator

2016-06-15 Thread Florent Castelli
To this, I would add that you could also remove duplicates. They’re rare but 
can happen in some conditions and trigger warnings in Ninja.

/Florent

> On 14 Jun 2016, at 17:18, Nicolas Desprès  wrote:
> 
> Hi,
> 
> While working on something else I wrote this patch:
> https://github.com/nicolasdespres/CMake/commit/59e4e62ba014c6fcd4519b57b621d9434f99ff19
>  
> 
> 
> It makes the ninja generator more deterministic by sorting the build edge's 
> inputs/outputs. It does not introduce any regression on my macbookpro.
> 
> This could help to fix issue #15968.
> 
> Regards,
> 
> -- 
> Nicolas Desprès
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] Toward a more deterministic ninja generator

2016-06-14 Thread Nicolas Desprès
Hi,

While working on something else I wrote this patch:
https://github.com/nicolasdespres/CMake/commit/59e4e62ba014c6fcd4519b57b621d9434f99ff19

It makes the ninja generator more deterministic by sorting the build edge's
inputs/outputs. It does not introduce any regression on my macbookpro.

This could help to fix issue #15968.

Regards,

-- 
Nicolas Desprès
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers