Skip to content
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

build failed #1

Open
muralikodali opened this issue Apr 15, 2020 · 16 comments
Open

build failed #1

muralikodali opened this issue Apr 15, 2020 · 16 comments

Comments

@muralikodali
Copy link

building with stack failed giving following message :

Zettel > configure (lib + exe)
Warning: Zettel.cabal:50:3: Unknown field: "extra-source-files"
Configuring Zettel-0.1.0.0...
Warning: For packages using 'cabal-version: >= 1.10' the 'extensions' field is
deprecated. The new 'default-extensions' field lists extensions that are used
in all modules in the component, while the 'other-extensions' field lists
extensions that are used in some modules, e.g. via the {-# LANGUAGE #-}
pragma.
Zettel > build (lib + exe)
Preprocessing library for Zettel-0.1.0.0..
Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3: can't find source for ZettelKasten in
src, .stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/autogen,
.stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/global-autogen

Completed 67 action(s).

-- While building package Zettel-0.1.0.0 using:
/home/zenova/projects/haskell/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 build lib:Zettel exe:Zettel --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1

@aleator
Copy link
Owner

aleator commented Apr 15, 2020

Hi!

Thank you for reporting this. I think I've been sloppy and forgotten a file from git.
I've hopefully fixed it and a build from clone of efe4fc1 succeeds for me now.

@muralikodali
Copy link
Author

after update of repository, zettel is built successfully.

from the usage point, i would like to make some suggestions.

  • file names contain werird characters

zettel_filename

  • there is some name conflict found when using Zettel. I have copied Zettel to zettel ( with lower case - two executables ) to remove the error message.

zf_preview

  • opening in vim gives accessibility to commands, mappings are not available .

  • i also request to provide some elaborative examples to understand your software approach to ZettelKasten.

sorry for making all these requests , though you have stated "This is a program build by me and for me"

@aleator
Copy link
Owner

aleator commented Apr 15, 2020

No problem! Fixing stuff like this will improve the program for me as well. But, you'll need some patience for both me and the program :)

bc22f6a should fix the Zettel / zettel issue. OS X is rather stupidly case insensitive and typos like this are pretty hard to find.

The weird characters in file names are intentional at this point. The box you're seeing is missing counterbracket to ⟦, ie ⟧ and the random characters inside the brackets are there so that zettels created in different computers (aka. work/home) can be safely merged without collisions.
I'm really not happy with the file-name scheme, but fixing it takes some thinking. I'll make an issue to track this. However, as the filenames aren't used by themselves all that much, I think that this is mostly an aesthetic issue.

For the mapping issues, could you possibly run :autocmd zettel in your vim after opening the zettel you've created? I'm really a newbie with vimscript, so I've probably screwed up with it.

I can make some use videos at some point, but these will take time. I'll see if I can make one or two tomorrow to see if they'd help.

@muralikodali
Copy link
Author

running autocmd zettel gives output :

vim_autocmd

@aleator
Copy link
Owner

aleator commented Apr 16, 2020

So, it gets loaded. Perhaps this is documentation issue, since the vimscript uses , as localleader. You can either use your localleader instead of ,(use :let maplocalleader to see what it is) or add let maplocalleader=',' to your vim config if you want to use , (or replace with your favourite key).

I'll fix the readme about this today.

@aleator
Copy link
Owner

aleator commented Apr 16, 2020

Also, added a really random exposition video. If I'd do similar for

  • Creating your first note
  • Adding notes and links
  • Navigating with wikilinks
  • Fuzzy finding

Would that suffice for starting out?

@muralikodali
Copy link
Author

updated zettel-hs giving error while building:

/home/murali/Downloads/Zettel-hs-master/app/Main.hs:404:13: error:
Variable not in scope: printLabels :: [Link] -> IO ()
|
404 | printLabels labeledLinks
| ^^^^^^^^^^^

-- While building package Zettel-0.1.0.0 using:
/home/zenova/projects/haskell/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 build lib:Zettel exe:Zettel --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1

@aleator
Copy link
Owner

aleator commented Apr 20, 2020

Hi,

Sorry. I seem to have pushed to the wrong branch on hurry.

Fixed in 5b44d9b

@muralikodali
Copy link
Author

now zettel compiled without error.

please ensure single command name i.e; zettel. no other command in linux start with capital letter.
commands like Zcre,ZTreeView,Zfill,Zf,ZextZlnk are loaded in vim. other commands and mappings like ZResolve,ZettelRecent,PasteQuote,ZettelLink are not loading at all.

@aleator
Copy link
Owner

aleator commented Apr 21, 2020

I went and acquired a blank linux for testing. I think I've now fixed the badly-cased binary issue for good. If any of the commands invoke the lowercase zettel, please let me know.

Your vim issue seems rather odd. I'm certainly no vimscript expert, but I can't see how part of the file is loading and part is not. Can you show me snippet from your init.vim that shows how you set localleader and how you source the file?

Also, can you tell me what :nmap and :vmap commands return for you?

@muralikodali
Copy link
Author

i am failing to build with error output :

Preprocessing library for Zettel-0.1.0.0..
Building library for Zettel-0.1.0.0..
[1 of 9] Compiling Prelude
[2 of 9] Compiling Meta.History
[3 of 9] Compiling Visualization
[4 of 9] Compiling Zettel
[5 of 9] Compiling Parser
[6 of 9] Compiling Operations
[7 of 9] Compiling Meta.Linkage
[8 of 9] Compiling ZettelKasten
[9 of 9] Compiling Elucidations
Preprocessing executable 'Zettel' for Zettel-0.1.0.0..
Building executable 'Zettel' for Zettel-0.1.0.0..
[1 of 1] Compiling Main

/home/murali/Downloads/Zettel-hs/app/Main.hs:409:57: error:
• Variable not in scope: placeholder :: Text
• Perhaps you meant data constructor ‘Placeholder’ (imported from Operations)
|
409 | (replacePlaceholder (Placeholder placeholder) labels
| ^^^^^^^^^^^

-- While building package Zettel-0.1.0.0 using:
/home/zenova/projects/haskell/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 build lib:Zettel exe:Zettel --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1

@aleator
Copy link
Owner

aleator commented Apr 21, 2020

Fixed. Pushed a wip in accident. Will figure out some strategy to avoid these in the future.

@muralikodali
Copy link
Author

thanks for your suggestions.

there is some problem with vim key mapping from my side. zettel leder key is mapped to "" instead of my vimrc setting "," . mapped keys worked as intended with change of leader key.

zp - pbpaste has problem on my linux machine. I have bypassed that problem by providing some aliases to shell configuration.

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

now this program just began to provide value for using with some pain areas like file naming with odd characters. I have not still tried tantivy.

I have some problem with zettel neighbourhood (\zn) . preview is not working.
I have attached screenshot below.

20200421T1824-crop

@aleator
Copy link
Owner

aleator commented Apr 21, 2020

Perhaps you've sourced the zettel.vim before setting the localleader? To my limited understanding, it might be that nmaps don't actually store <localleader> but instead resolve it while doing the binding. So, perhaps try swapping them if that'd help?

Also, I will at some point add a configuration file with which you could choose commands like pbpaste and even fzf to your liking. But that still needs some thought.

Could I ask for bit more details on the neighbour issue? The neighbours command looks at the links, but it doesn't actually check if the files are there. Other option is some encoding issue. Could you paste an ls output of your ~/zettel so I'd have a hint which it is?

Good to know.

@muralikodali
Copy link
Author

❯ ls ~/zettel
2020-4-16-morning-⟦མཙ⟧-hello.zettel 2020-4-20-evening-⟦ᤀᤁ⟧-sedsed.zettel 2020-4-20-evening-⟦རᤔ⟧-nomino.zettel 2020-4-21-afternoon-⟦ᤈ7⟧-covid

@aleator
Copy link
Owner

aleator commented Apr 30, 2020

Hi again,

Sorry for taking so long, but I've been occupied with work-related stuff.

Have you renamed your files or created them manually? The program shouldn't add extensions to files by itself. The links are stored in a database so you don't need to scan files to extract things like neighbourhoods and it previously had no means for detecting external changes.

8e46e4b introduces a "rescan" command that will re-index your zettels after manual changes. Also, it will now try to update links when you open zettels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants