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

Running dlang-tour offline is broken #443

Open
wilzbach opened this issue Aug 15, 2016 · 5 comments
Open

Running dlang-tour offline is broken #443

wilzbach opened this issue Aug 15, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@wilzbach
Copy link
Member

With these commands:

dub fetch dlang-tour
dub run dlang-tour

one gets:

Compiling diet template 'tour.dt'...
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Copying files for dlang-tour...
Running ../../../.dub/packages/dlang-tour-1.0.1/dlang-tour/dlang-tour 
Error loading config file 'config.yml'. Falling back to defaults: dyaml.exception.YAMLException@../../../.dub/packages/dyaml-0.5.3/dyaml/source/dyaml/loader.d(138): Unable to open file config.yml for YAML loading: config.yml: No such file or directory
std.file.FileException@std/file.d(3441): public/content: No such file or directory

well yes - I didn't ran it in my local fork, but any other user wouldn't have this fork neither, so maybe we should add some logic to search for the root source directory?

@wilzbach wilzbach added the bug label Aug 15, 2016
@wilzbach wilzbach added this to the release-1.1 milestone Aug 15, 2016
@stonemaster
Copy link
Collaborator

Damn I must have tried that in my local dlang-tour directory. Is there something in dub that lets you copy or package external files so that the run command works out of the box? I mean dub already clones the repository but it doesn't seem to change the working directory to the correct folder...

@wilzbach
Copy link
Member Author

Is there something in dub that lets you copy or package external files so that the run command works out of the box? I mean dub already clones the repository but it doesn't seem to change the working directory to the correct folder...

Not that I would know of. The best you can do is probably using the output of dub describe dlang-tour

@wilzbach
Copy link
Member Author

this might be related to #461 which is about giving the user control to set the content directory.

@wilzbach wilzbach self-assigned this Aug 25, 2016
wilzbach added a commit to wilzbach/dlang-tour that referenced this issue Aug 25, 2016
@wilzbach wilzbach reopened this Jun 5, 2017
@wilzbach
Copy link
Member Author

wilzbach commented Jun 5, 2017

Hmm, we still have this issue as dub fetch doesn't fetch the git submodules automatically, see e.g. dlang/dub#1044

Probably the best way to deal with this, would be have a behavior if public/content can't be found similar to this:

  • download and extract the respective zip files of the submodules (parsed from .gitmodules) to a user directory (e.g. ~/.config/dlang-tour/languages)
  • store the latest version for each version within the folder
  • if the last run was more than 7 days ago and there's a internet connection, try to update the zip folders (in the background and automatically refresh the content - without any user interaction)

@biocyberman
Copy link

biocyberman commented Jul 7, 2017

For now, a simple and less technical workaround I am using:

#suppose I want to run dlang-tour with english language:
cd ~/.dub/packages/dlang-tour-1.0.6/dlang-tour
git clone https://github.com/dlang-tour/english.git 
dub run dlang-tour -- --lang-dir english

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

No branches or pull requests

3 participants