Code Monkey home page Code Monkey logo

Comments (9)

kleintom avatar kleintom commented on June 14, 2024

Also, I forgot - when I do ./mach bootstrap from within docker I get:

Traceback (most recent call last):
File "./mach", line 148, in
main(sys.argv[1:])
File "./mach", line 76, in main
mach = get_mach()
File "./mach", line 67, in get_mach
mach = check_and_get_mach(dir_path)
File "./mach", line 42, in check_and_get_mach
return load_mach(dir_path, mach_path)
File "./mach", line 30, in load_mach
return mach_bootstrap.bootstrap(dir_path)
File "/home/dxr/dxr/ff/mozilla-central/build/mach_bootstrap.py", line 314, in bootstrap
mach.load_commands_from_file(os.path.join(mozilla_dir, path))
File "/home/dxr/dxr/ff/mozilla-central/python/mach/mach/main.py", line 258, in load_commands_from_file
imp.load_source(module_name, path)
File "/home/dxr/dxr/ff/mozilla-central/addon-sdk/mach_commands.py", line 13, in
from mozbuild.base import (
File "/home/dxr/dxr/ff/mozilla-central/build/mach_bootstrap.py", line 340, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/home/dxr/dxr/ff/mozilla-central/python/mozbuild/mozbuild/base.py", line 17, in
from mach.mixin.process import ProcessExecutionMixin
File "/home/dxr/dxr/ff/mozilla-central/build/mach_bootstrap.py", line 340, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/home/dxr/dxr/ff/mozilla-central/python/mach/mach/mixin/process.py", line 29, in
raise Exception('Could not detect environment shell!')
Exception: Could not detect environment shell!

Setting export SHELL=/bin/bash fixes it, but seems like that should be getting set somewhere else...

from dxr.

erikrose avatar erikrose commented on June 14, 2024

If you pop onto #static on irc.mozilla.org, we can chat in realtime. I'm addressing some of your comments as we speak!

from dxr.

erikrose avatar erikrose commented on June 14, 2024

f3c5db8 adds a shiny new /code folder you can park your source in, and it won't evaporate when the container goes away.

from dxr.

erikrose avatar erikrose commented on June 14, 2024

Setting export SHELL=/bin/bash fixes it, but seems like that should be getting set somewhere else

tooling/docker/dev/Dockerfile would probably be a good place to set that, right in the same line where we set VIRTUAL_ENV and PATH.

from dxr.

erikrose avatar erikrose commented on June 14, 2024

I can take a shot at updating the docs

Have at it!

from dxr.

asutherland avatar asutherland commented on June 14, 2024

What's the right way to address the need to run "./mach bootstrap" and "./mach mercurial-setup" every time "make shell" is invoked (since everything outside /code and ~/dxr is ephemeral)? Should an additional make target and docker image layer-thing be created that are mozilla-central specific? Is there something we can set in the docker image to make the root-level mutations be persistent? (I am verrrrrry new to docker. And I think comment 0 is sorta talking about this too.) Thanks!

from dxr.

erikrose avatar erikrose commented on June 14, 2024

@asutherland Yes, it is kind of a drag for packaged dependencies to evaporate all the time. I don't have a ready-made answer for you, unfortunately, but here are a couple ideas. Perhaps you can develop them further and share what you find. :-)

  1. Add a noninteractive call to mach bootstrap and the mercurial setup to the Dockerfile, so the installed packages get cached. (Having to modify the Dockerfile is a bit ugly, though.)
  2. Install the packages, then use the docker commit command to manually cache an image with the packages installed. I'm not sure how you then easily boot a container based on that image while tying it together with the other ones (es, dev, and venv). That would be something to look into.

from dxr.

asutherland avatar asutherland commented on June 14, 2024

Thanks for the quick reply and suggestions! I suppose a related question is whether there's a plan to move DXR to use taskcluster. I think it uses Jenkins right now? But since taskcluster is based on docker, there may be ways to align the two use-cases if that's something you're interested in. (I say this to help guide my investigation rather than suggest scope creep for you, noting that I also have only limited taskcluster experience so it'd be more a question of what idioms I would attempt to naively imitate.)

from dxr.

erikrose avatar erikrose commented on June 14, 2024

from dxr.

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.