GithubHelp home page GithubHelp logo

Panic while copying assets about vab HOT 7 CLOSED

vlang avatar vlang commented on May 30, 2024
Panic while copying assets

from vab.

Comments (7)

xandro0777 avatar xandro0777 commented on May 30, 2024 1

it was like this, could zip it up of course if that is needed. However I get far enough to reproduce it only after working around #118.

$ git clone --depth=1 https://github.com/vlang/ui.gi
$ cd ui/examples
$ vab rectangles.v

from vab.

xandro0777 avatar xandro0777 commented on May 30, 2024 1

from vab.

xandro0777 avatar xandro0777 commented on May 30, 2024

Moved the example to a separate directory without the "assets" subdir, the package was built but with an empty assets subdir. Scratching my head.

from vab.

xandro0777 avatar xandro0777 commented on May 30, 2024

So apparently opt.input was "." and hence it tried to copy ./assets twice to the same place. os.cp_all returns an error saying directory not empty.

This special case can be fixed by testing opt.input is "." and avoiding to attempt co copy "./assets" twice.

But I wonder if it is required that only one "source assets" dir exists, or if it was intended that assets from several provided sources are merged that way? Or yet another alternative, stop searching further asset dirs after finding the first one?

from vab.

Larpon avatar Larpon commented on May 30, 2024

@xandro0777 - yes this looks like it might be a combination of a few issues.
You can maybe try running vab from it's project root and pass in the asset path(s) like:

cd /home/rz/prog/vab
./vab -v 3 --assets /home/rz/.vmodules/ui/examples/assets  /home/rz/.vmodules/ui/examples/rectangles.v

vab is currently dependant on having it's android directory available beside the executable if I remember correctly. So it's not too happy about it if you run it from somewhere else. In the future it will probably work like v itself by using a symlink to /usr/local/bin - or maybe we can distribute it's dependencies embedded in the executable.

from vab.

xandro0777 avatar xandro0777 commented on May 30, 2024

from vab.

Larpon avatar Larpon commented on May 30, 2024

Can you provide a minimal project / zip that I can use to test this specific scenario? Thanks in advance

from vab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.