GNU bug report logs -
#26346
[PATCH] asdf-build-system improvements.
Previous Next
Reported by: Andy Patterson <ajpatter <at> uwaterloo.ca>
Date: Mon, 3 Apr 2017 05:36:01 UTC
Severity: normal
Tags: patch
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Andy Patterson <ajpatter <at> uwaterloo.ca> writes:
> In support of long-running programs in which the users would like to be able
> to jump to the source of a definition of any of the dependencies (itself
> included) of the program.
>
> * guix/build/asdf-build-system.scm (library-outputs): Move from here ...
> * guix/build/lisp-utils.scm (library-outputs): ... to here.
> (build-program): Accept dependency-prefixes argument, to allow the caller to
> specify references which should be retained. Default to the library's output.
> (build-image): Likewise.
> (generate-executable): Likewise.
> * gnu/packages/lisp.scm (sbcl-stumpwm+slynk, sbcl-slynk, sbcl-stumpwm): Adjust
> accordingly to the new interface.
> (sbcl-stumpwm+slynk)[native-inputs]: Move to ...
> [inputs]: ... here.
> ---
[…]
> @@ -361,5 +375,23 @@ executable."
>
> (generate-executable-for-system type name)
>
> + (let* ((third-slash-index
> + (string-index out-file #\/
> + (1+ (string-length (%store-directory)))))
> + (output (string-take out-file third-slash-index))
> + (hidden-asd-links (string-append output "/.asd-files")))
> +
> + (mkdir-p hidden-asd-links)
> + (for-each
> + (lambda (path)
> + (for-each
> + (lambda (asd-file)
> + (symlink asd-file
> + (string-append hidden-asd-links
> + "/" (basename asd-file))))
> + (find-files (string-append path (%bundle-install-prefix))
> + "\\.asd$")))
> + dependency-prefixes))
> +
> (delete-file (string-append bin-directory "/" name "-exec.asd"))
> (delete-file (string-append bin-directory "/" name "-exec.lisp"))))
The naming here implies that the package is at the third level, but
users can have a store an arbitrary number of directories deep.
“third-slash-index” is really just the position after the store prefix,
so I’m going to rename it before pushing.
I don’t really like the use of “dependency-prefixes”. It seems
inelegant. Can the build system not determine automatically what
references ought to be retained?
That said, I’m going to push this first, as it is an improvement.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
This bug report was last modified 8 years and 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.