I need help getting agda mode to work on my emacs system. Essentially, syntax highlighting only occurs after I save and not in real time like other standard modes. I did the basic tutorial. I run Manjaro on my system so I used pacman to install agda (2.6.0.1) and agda-stdlib (1.2-1). After that, I did
agda-mode setup
What this did was add
(load-file (let ((coding-system-for-read 'utf-8))
(shell-command-to-string "agda-mode locate")))
to my .init.el in my .emacs.d file. So then, I thought everything was well. However, when I did boot up emacs and I tried using some file I found on the internet to learn agda ( https://oxij.org/note/BrutalDepTypes.lagda). However, there only seems to be syntax highlighting when I save the file and any new text is not colored until saved. I tried to solve this by instead removing the code from .init.el in .emacs.d and instead putting it in my .init.el in .doom.d instead. But still I get the same results. I also did sudo agda-mode compile as well which gives me the following output:
Loading quail/latin-ltx...
I use sudo because otherwise I get this
>>Error occurred processing /usr/share/agda/emacs-mode/agda2-abbrevs.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda2-abbrevs.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda2-abbrevs.elc
>>Error occurred processing /usr/share/agda/emacs-mode/annotation.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/annotation.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/annotation.elc
>>Error occurred processing /usr/share/agda/emacs-mode/agda2-queue.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda2-queue.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda2-queue.elc
>>Error occurred processing /usr/share/agda/emacs-mode/eri.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/eri.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/eri.elc
>>Error occurred processing /usr/share/agda/emacs-mode/agda2.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda2.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda2.elc
>>Error occurred processing /usr/share/agda/emacs-mode/agda-input.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda-input.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda-input.elc
>>Error occurred processing /usr/share/agda/emacs-mode/agda2-highlight.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda2-highlight.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda2-highlight.elc
Loading quail/latin-ltx...
>>Error occurred processing /usr/share/agda/emacs-mode/agda2-mode.el: File error (("Opening output file" "Cannot overwrite file" "/usr/share/agda/emacs-mode/agda2-mode.elc"))
Removing old name: Permission denied, /usr/share/agda/emacs-mode/agda2-mode.elc
Unable to compile the following Emacs Lisp files:
/usr/share/agda/emacs-mode/agda2-abbrevs.el
/usr/share/agda/emacs-mode/annotation.el
/usr/share/agda/emacs-mode/agda2-queue.el
/usr/share/agda/emacs-mode/eri.el
/usr/share/agda/emacs-mode/agda2.el
/usr/share/agda/emacs-mode/agda-input.el
/usr/share/agda/emacs-mode/agda2-highlight.el
/usr/share/agda/emacs-mode/agda2-mode.el
But this failed to work too.
I tried a different file too:
{- My Agda Tutorial-}
Module Tut where
open import Data.List
rev : {A : Set} -> List A -> List A
which didn't change much, but also gave me this error when I tried to typecheck the file
/usr/share/agda/lib/_build: createDirectory: permission denied
(Permission denied)
Any thoughts on how to fix this? I would really like to use my same doom config.
syntax highlighting only occurs after I save
This is intended. The coloration occurs after the buffer has successfully been typecked. You are trying to solve an issue that presumably does not exist.
Since type checking the buffer is an essential part in an Agda development you should not have a hard time getting used to doing it often while programming.
In order to manually call the type checker, the shortcut is CTRL-C CTRL-L.
Related
I have vsc version 1.63.2. I'm getting the following notification:"File changes watcher stopped unexpectedly. A reload of the window may enable the watcher again unless the workspace cannot be watched for file changes." In the "Window" logs (opened using the "Developer: Open Log File..." command from the Command Palette), there's an error:
[renderer4] [error] [File Watcher (parcel)] Unexpected error: Bad file descriptor (EUNKNOWN) (path: /home/username/project_root)
[renderer4] [error] [File Watcher (parcel)] gave up attempting to restart watcher after error: Bad file descriptor
Any help troubleshooting this is greatly appreciated!
There is a bug when the project directory contains files you don't own.
For instance, you can have a docker volume that generate root files. -_-
A fix has been done but isn't released yet: http://giters.com/microsoft/vscode/issues/139523
As a workaround you can find offending files with:
find . ! -user myusername
Then you should add them to settings.json:
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/mongodb/mongo-volume/**": true,
"**/rabbitmq/data/**": true,
"**/rabbitmq/logs/**": true
},
You must provide full relative path from project root directory or it won't work.
I am facing "Taskhash mismatch" & "The metadata is not deterministic and this needs to be fixed" error in Yocto project build. This issue arises without any obvious reasons. With a perfectly good source code repo, the build is success sometime, while it fails some time. There is no change in source code/recipe or any other build parameters.
Error log:
ERROR: When reparsing /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_populate_lic, the basehash value changed from e0bfa2ad64f24d189d23f9d84918c74a7253e0d7e9c7fea4e3346cbc473d43da to c108c533ec82c43aa15730e4ca9c9838f87133e63417f40af0de8ca8cb43f51a. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Snone
ERROR: Then:
ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Sprintdiff
ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_qa: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
ERROR: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_write_rpm: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
ERROR: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
I resolved this issue by doing two of the following action.
Clean the recipe which throws error during build using following command
bitbake -c cleansstate sub_project-rootfs-base
Update the bb file timestamp by doing empty write or by touching file.
Open the bb file using your editor - vim /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb
Write the file by clicking save button or in vim writing ":w" command
Close the file using "x" button or ":q" command.
Rebuild the project as usual.
Edit : In case there are multiple bitbake recipes showing this error, you can touch all bb files and build again. Go into your yocto folder and run following command. This will take some to touch all file and significantly higher time to rebuild the project.
find . -type f -name "*.bb" -exec touch {} +
I'm triyg to configure a project with projectile, Jdee and flycheck.
I have customized flycheck-check-syntax-automatically to just check the buffer when it is saved. But when I save, this error is showed:
error in process filter: Removing directory: Permission denied, c:/Users/xxxxx/AppData/Local/Temp/JDEE_flycheck_13016Htm
That folder seems to be locked by jdee-server. Any clue?
I'm following instructions to create_autonomy, but I keep getting the following error:
[create_2.launch] is neither a launch file in package [ca_driver] nor is [ca_driver] a launch file name. The traceback for the exception was written to the log file
Does anyone know what I'm doing wrong?
Dr-Memory won't debug my application, I tried allready the -logdir option (I use -logdir C:\Users\r0b3\temp\drmemory).
The Error Message is
WARNING: unable to locate results file since can't open
C:\Users\r0b3\temp\drmemory/resfile.7116: 2
~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000005
Any hints?