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

Include on bigger documents have often problems #114

Closed
de-jcup opened this issue Jun 25, 2018 · 10 comments
Closed

Include on bigger documents have often problems #114

de-jcup opened this issue Jun 25, 2018 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@de-jcup
Copy link
Owner

de-jcup commented Jun 25, 2018

I still have often the problem that includes used in subfiles are not correctly shown.

The mechanism to resolve root dir goes too much deep.


/src/docs/asciidoctor
    gen/generated_01.adoc
    shared/shared01.adoc (includes ./../gen/generated_01.adoc)
    techdoc/chapter1/ch01_text.adoc (includes ./../shared/shared01.adoc)
 main.adoc

In such a combination e.g. the shared01.adoc has problems, because currently the rootfolder detection
mechanism will go to src/docs/asciidoctor because there is the root for .adoc files

Asciidoc files are always relative to their own position when doing includes. So the resolving of
src/docs/asciidoctor as doc folder will result in problem that the include cannot be rendered by
asciidoctor.

The image mechanism to fetch the root image path etc. is okay. But not this one.

Should have some junit test to prevent those siutations again!

@de-jcup de-jcup self-assigned this Jun 25, 2018
@de-jcup de-jcup added the bug Something isn't working label Jun 25, 2018
@de-jcup de-jcup added this to the 1.0.1 milestone Jun 25, 2018
@de-jcup de-jcup modified the milestones: 1.0.1, 1.1.0 Jul 5, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Jul 5, 2018

Moved to 1.1.0 because this takes more time and 1.0.1 should be released

@de-jcup de-jcup changed the title Include handling still working will on single files of bigger documents Include on bigger documents have often problems Sep 5, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Sep 5, 2018

There is also a comment inside #90 about those situations.

@de-jcup
Copy link
Owner Author

de-jcup commented Sep 25, 2018

Hmm... currently I am having no such problems and I do also not have any example code to correctly reproduce.

So decided to move to next milestone.

@de-jcup de-jcup modified the milestones: 1.1.0, 1.2.0 Sep 25, 2018
@de-jcup de-jcup modified the milestones: 1.2.0, 1.3.0 Oct 11, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Oct 12, 2018

Funny : using Version 1.2.0 now and having again such a problem, when switching to installed asciidoctor the problem disappears and includes are resolved. Switching back the problems appear again and having an output like

Unresolved directive in 06_runtime_view.adoc - include::./../gen/gen_usecases.adoc[]
Unresolved directive in 06_runtime_view.adoc - include::./../gen/gen_uc_restdoc.adoc[]

Either it has to do with asciidoctor variant or the adoptions of outdir in execution phase?

@de-jcup
Copy link
Owner Author

de-jcup commented Oct 29, 2018

On the other side installed asciidoctor with default options has problems with diagram including! see #161

@de-jcup
Copy link
Owner Author

de-jcup commented Dec 18, 2018

There is still an issue if somebody has multiple document folders, means multiple base dirs.

@de-jcup de-jcup reopened this Dec 18, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Dec 18, 2018

@de-jcup
Copy link
Owner Author

de-jcup commented Dec 18, 2018

Hmm.. refresh does not rebuild cached base dir completely.

@de-jcup de-jcup reopened this Dec 18, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Dec 18, 2018

@vogella Could you do me a favour and checkout 38e7814 - or master HEAD - and test if the includes now working with your documentation setups much more better? There should be no longer any include problems.

I tried it with one of my bigger documentation projects and did no longer found any problems - no matter if I am using installed asciidoctor or embedded one, nor if using external or internal previews.

Thanx a lot ...

@vogella
Copy link
Collaborator

vogella commented Jan 14, 2019

I don't use the internal build so I don't think I'm a good tester for this. I always build outside of Eclipse via the command line.

de-jcup pushed a commit that referenced this issue Feb 5, 2019
- added test scripts for described behaviour
- was already fixed with #114, includes in added
  test scripts are now resolved by hyperlinking and also
  at render time
de-jcup added a commit that referenced this issue Feb 5, 2019
- creating now always a temporary file in base dir which 
  includes real one with relative path. So able to set 
  real basedir necessary for images, diagrams etc...
de-jcup added a commit that referenced this issue Feb 5, 2019
- not very cool solved, but when files are not
  in current base dir for project they will
  be rendered just as done formerly. Means
  of course that maybe images are not correctly
  shown, but at least content is there.
  
  Also users got the possiblity to close all 
  editors  open file and do refresh - this will
  reset the base directory
de-jcup added a commit that referenced this issue Feb 5, 2019
- cached basedir in provider is also refreshed now
- created base class for providers
  every registered provider is now doing a reset
  when proviate context reset is triggered
de-jcup added a commit that referenced this issue Feb 5, 2019
- added test scripts for described behaviour
- was already fixed with #114, includes in added
  test scripts are now resolved by hyperlinking and also
  at render time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants