New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ fix #2610 ] Build directory for version specific agdai files #3949
Conversation
If an .agda file is part of a project with an identifiable root (i.e. if there is an agda-lib file in any of the directories above it) then we create a _build/VERSION directory at that root and we write the .agdai file storing its interface in it. If it does not have an identifiable root then we simply store the .agdai interface file alongside the file itself. Additional refactoring: disambiguating between AbsolutePath standing for source files and the ones standing for interface files.
Could make tracking issues for those, these are just drive-by thoughts! |
OTOH, |
I think a global configuration (similar to the |
That being said, I would be in favour of merging this as is. Currently the users |
Makes space for _build/VERSION/ghc, _build/VERSION/js, etc.
@gallais The problem is with building and copying the builtin files in |
Right. The easy option is to add a (For the agda-stdlib travis build I simply made sure I was building agda in a |
On top of these suggestions (why not both?), wouldn't it also make sense to update |
* [ fix #2610 ] Build directory for version specific agdai files If an .agda file is part of a project with an identifiable root (i.e. if there is an agda-lib file in any of the directories above it) then we create a _build/VERSION directory at that root and we write the .agdai file storing its interface in it. If it does not have an identifiable root then we simply store the .agdai interface file alongside the file itself. Additional refactoring: disambiguating between AbsolutePath standing for source files and the ones standing for interface files. * [ fix ] api-test using the new SourceFile / Interface * [ agdai ] stored in _build/VERSION/agda Makes space for _build/VERSION/ghc, _build/VERSION/js, etc. * [ changelog ] new location of interface files
* [ fix #2610 ] Build directory for version specific agdai files If an .agda file is part of a project with an identifiable root (i.e. if there is an agda-lib file in any of the directories above it) then we create a _build/VERSION directory at that root and we write the .agdai file storing its interface in it. If it does not have an identifiable root then we simply store the .agdai interface file alongside the file itself. Additional refactoring: disambiguating between AbsolutePath standing for source files and the ones standing for interface files. * [ fix ] api-test using the new SourceFile / Interface * [ agdai ] stored in _build/VERSION/agda Makes space for _build/VERSION/ghc, _build/VERSION/js, etc. * [ changelog ] new location of interface files
If we want to revert back to writing the interface files alongside the module ones, we can call Agda with --local-interfaces.
I tripped over this problem while running |
If we want to revert back to writing the interface files alongside the module ones, we can call Agda with --local-interfaces.
Squashed commits: * added interface file documentation Added information about the .agdai interface files #4425 * Update interface-files.rst Update two first comments @andreasabel * Update interface-files.rst updated info from PR #3949 from @gallais * Update interface-files.rst changed expression tree as the reult of the translation. * Update interface-files.rst changed to formal writing style * changed expression trees for storage and some minor changes [ci skip]
I am using nix and my libraries are in $AGDA_PACKAGE_PATH environment variable. |
Agda has always needed write access to the library's directory to write |
This can presumably be fixed by creating the interface files when the library is installed (and recreating them when Agda is reinstalled). |
If an .agda file is part of a project with an identifiable root
(i.e. if there is an agda-lib file in any of the directories above it)
then we create a _build/VERSION directory at that root and we
write the .agdai file storing its interface in it.
If it does not have an identifiable root then we simply store the
.agdai interface file alongside the file itself.
Additional refactoring: disambiguating between AbsolutePath standing
for source files and the ones standing for interface files.