public inbox for goredo-devel@lists.cypherpunks.ru
Atom feed
* Re: arguments for redo-targets and redo-sources?
@ 2021-06-21 16:32 Karolis K
  2021-06-22  7:56 ` Sergey Matveev
  0 siblings, 1 reply; 4+ messages in thread
From: Karolis K @ 2021-06-21 16:32 UTC (permalink / raw)
  To: goredo-devel

Hello and wow - thank you for such a prompt response!

I like the implementation of redo-source, but I expected something a bit different for redo-targets.
And on the second thought, maybe it was my misunderstanding …

I imagined (for some reason) that redo-targets would be the opposite of redo-sources. i.e.:

`redo-sources file`- lists all the files that, if changed, could potentially affect the file
`redo-targets file` - lists all the files that could potentially be affected by the change in the file

I now see that maybe I misunderstood things. But I imagine a command listing all the files that have some target as a source would be useful nonetheless.
Maybe there is a better way to do this currently, which I am naively not aware of?

Warm regards,
Karolis K.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arguments for redo-targets and redo-sources?
  2021-06-21 16:32 arguments for redo-targets and redo-sources? Karolis K
@ 2021-06-22  7:56 ` Sergey Matveev
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Matveev @ 2021-06-22  7:56 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

Greetings!

*** Karolis K [2021-06-21 19:32]:
>I imagined (for some reason) that redo-targets would be the opposite of redo-sources. i.e.:

Ah, I see. Actually you told about that in your previous message. But I
thought that somehow you use an "ordinary" redo-targets for that tasks
already. As I can see, no other implementation has that functionality.

I created redo-affects command in 1.6.0 release. It works not so fast,
but shows everything that will be affected by specified targets/sources.
But pay attention that it collects all known targets from the current
directory, to limit the expensive targets searching and the whole
dependency information collecting. For example:

    % redo-affects src/tai.h
    doc/crick.info
    doc/docstringer.log
    lib
    src/libcrick.a
    src/log.o
    src/tai.o

    % cd src ; redo-affects tai.h
    libcrick.a
    log.o
    tai.o

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arguments for redo-targets and redo-sources?
  2021-06-20  9:38 Karolis K
@ 2021-06-21 13:47 ` Sergey Matveev
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Matveev @ 2021-06-21 13:47 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]

Greetings!

*** Karolis K [2021-06-20 12:38]:
>Note that this was also on the roadmap of apenwarr's redo implementation:
>https://redo.readthedocs.io/en/latest/Roadmap/#redo-sourcestargetsood-should-take-a-list-of-targets

Seems good idea. Personally I have never tried to use redo-ood/sources/targets,
so have no private experience with those use-cases.

In 1.5.0 I added the ability to narrow the results of redo-ood/sources/targets,
by specifying an optional list of targets. Moreover redo-sources recursively
goes through all dependencies, showing all source files affecting the
specified target. For example in my C-project I get:

    % redo-sources src/zero.o
    conf/cmd/default.do
    conf/cmd/list
    conf/flags/common.rc.do
    conf/flags/dmalloc.rc.do
    conf/flags/mutex.pthread.rc
    conf/flags/mutex.rc.do
    conf/flags/pc.list
    conf/flags/tai.rc.do
    conf/fn2env.sh
    conf/methods.do
    conf/vars.do
    conf/vars.list.do
    config
    src/zero-bzero.c
    src/zero.h
    src/zero.o.do

    % cd src ; redo-sources mlock.o
    ../conf/cmd/default.do
    ../conf/cmd/list
    ../conf/flags/common.rc.do
    ../conf/flags/dmalloc.rc.do
    ../conf/flags/mutex.pthread.rc
    ../conf/flags/mutex.rc.do
    ../conf/flags/pc.list
    ../conf/flags/tai.rc.do
    ../conf/fn2env.sh
    ../conf/methods.do
    ../conf/vars.do
    ../conf/vars.list.do
    ../config
    cricksdt.d
    cricksdt.h.do
    dtrace-dummy.pl
    err.h
    log.h
    mlock-posixrt.c
    mlock.h
    mlock.o.do

so I clearly see that changing of anything related to various flags and
commands determination will probably affect building of the object files.
Looks pretty useful!

And seems I have satisfied apenwarr/redo's roadmap entry.

Also redo.sh-tests project contains the newly appeared redo-ood related
tests, that are also passing in goredo.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arguments for redo-targets and redo-sources?
@ 2021-06-20  9:38 Karolis K
  2021-06-21 13:47 ` Sergey Matveev
  0 siblings, 1 reply; 4+ messages in thread
From: Karolis K @ 2021-06-20  9:38 UTC (permalink / raw)
  To: goredo-devel

Hello,

I have one suggestion/request/opinion about redo-targets and redo-sources.

It would be nice if those scripts would accept a filename(s) argument and then list targets/sources only related to the provided filename(s).
This would allow to quickly check the targets and sources for a particular artefact.
In my use case it would enable me to check which dependencies I might break by changing a particular .do script.

Note that this was also on the roadmap of apenwarr's redo implementation:
https://redo.readthedocs.io/en/latest/Roadmap/#redo-sourcestargetsood-should-take-a-list-of-targets

Warm regards,
Karolis K.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-22  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 16:32 arguments for redo-targets and redo-sources? Karolis K
2021-06-22  7:56 ` Sergey Matveev
  -- strict thread matches above, loose matches on Subject: below --
2021-06-20  9:38 Karolis K
2021-06-21 13:47 ` Sergey Matveev