Comments (10)
I will try to fix this in the coming week. What I've found is that it's as easy as passing --nimcache:path
to change the nimcache folder. And we can get the current nimcache folder using this code from forum thread:
import std/compilesettings
const nimcache = querySetting(SingleValueSetting.nimcacheDir)
So we just have to combine this nimcache
with the relative path of the current document to get the desired results.
from nimibook.
Yes that sounds like it could work. And we would get the benefit of all the cache being intact 👍
from nimibook.
ah but you have also stuff like /home/runner/.cache/nim/index_d/@mindex.nim.c.o
so that might create a conflict anyway
from nimibook.
ah but you have also stuff like
/home/runner/.cache/nim/index_d/@mindex.nim.c.o
so that might create a conflict anyway
Yes exactly, it's those that are the problem I think because it was the C compiler that complained about not finding references. Which would be because we have overridden some file before it was finished compiling or something like that
from nimibook.
Isn't there some compiler option that allows to override the name of file in cache? If so we could just add the index of the file in the list of file to build or something else to disambiguate
from nimibook.
I would say it depends on what -o:outputname
does when using nim r
as there is no non-temporary binary to save. Hopefully it uses that name as well in the cache but I'm not holding my hopes up 😬 will investigate it further tomorrow, I hope I'm wrong though.
from nimibook.
another option would be to override the Nim cache folder and replicate the folder structure of source files (+ a base folder that could be the default one)
from nimibook.
I have tried setting -o:another_name
and it doesn't work sadly :/.
another option would be to override the Nim cache folder and replicate the folder structure of source files (+ a base folder that could be the default one)
I'm not really following here, what is is we should replicate?
Should we create a unique nimcache folder for each file?
from nimibook.
well if I understand correctly we have issues with a structure like this:
index.nim
section1/index.nim
because when processed concurrently nim creates c files with the same name in nimcache folder (calling it $nimcache
here), like $nimcache/index.c
. If instead we ask for the second index file to use as nimcache $nimcache/section1
(so that the c file is $nimcache/section1/index.c
this should solve the issue, right?
from nimibook.
still, I had a brief look at the log and not entirely sure the issue is conflict of filenames:
I see a name like /home/runner/.cache/nim/index_d/index_48315C86F820572F8ADD5336011EE02A9F1B2C7F
and it looks like filenames are mangled? maybe it is an issue when filenames have same name and same content?
and to be honest I have only a limited knowledge of nimcache logic...
from nimibook.
Related Issues (20)
- IOError during nbook build, search for html file in docs instead of book HOT 3
- Missing "next" arrow in page HOT 5
- feature: a show source button or similar HOT 4
- support SUMMARY.md for table of contents HOT 1
- provide a nbook/nimibook binary
- highlight nim code in pages with markdown sources HOT 3
- refactor nimibook to use the new SSG
- improve clean command HOT 1
- book.json should only contain relative dirs
- refactor check to return number of failures
- useLatex as a book config
- Improve docs of toc srcDir homeDir
- Indentation of entries in sidebar in generated HTML is incorrect after sub-sections HOT 6
- next gives non existent page when last chapter is a draft
- mark as plaintext the code section of commands (otherwise highlighted as sql)
- Allow sections to be collapsed/expanded with a chevron-icon button HOT 2
- Licensing of embedded assets HOT 9
- Allow embedding a nim file as an nbCode block HOT 18
- a `nimibook / license` module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimibook.