question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[build] missing dist directory except run all.py first

See original GitHub issue

Have you read the FAQ and checked for duplicate open issues? Not related

What version of Shaka Player are you using? v3.0.5

Can you reproduce the issue with our latest release version? yes

Can you reproduce the issue with the latest code from master? yes (although current master build is bug right now - so I’m using v3.0.5)

What did you do?

git clone https://github.com/google/shaka-player
cd shaka-player && git checkout v3.0.5 && python3 build/build.py

What did you expect to happen? It should work

What actually happened? Except when we run build/all.py first and foremost

# Make the dist/ folder, ignore errors.
base = shakaBuildHelpers.get_source_base()
try:
  os.mkdir(os.path.join(base, 'dist'))
except OSError:
  pass

If we don’t run all.py first, we running into bug missing dist directory when build/apps.py, build/build.py, build/check.py

Sometimes people only interested in build.py (because it a released version - not much reason to run check.py or to generate docs).

I’ve a few ideas in mind:

  • we have mkdir in every py command
  • create a placeholder dist and forget about mkdir

Do you have any thoughts ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joeyparrishcommented, Nov 10, 2020

I ran your exact commands:

git clone https://github.com/google/shaka-player

cd shaka-player && git checkout v3.0.5 && mkdir dist && python3 build/build.py

And in dist/, I see:

$ ls dist/
locales.js  shaka-player.ui.externs.js  shaka-player.ui.js  shaka-player.ui.map  wrapper.js

That looks correct to me. The UI-enabled, compiled output is dist/shaka-player.ui.js, with a source map in dist/shaka-player.ui.map and compiler externs in dist/shaka-player.ui.externs.js. The rest are intermediate files generated, then used in compilation (locales.js, wrapper.js).

Does this help?

0reactions
kocoten1992commented, Nov 10, 2020

Thanks! I’ve figure out where I got confused.

There are 3 points:

  • Back in the day, we have jquery and jqueryui (when use jqueryui we MUST include jquery first), that mindset follow me until now, with shaka-player we don’t have to (fact is: shaka-player.ui already include shaka-player) - I agree here, some other library I know also did this, for example in laravel (a php framework), fortify for core authentication (without ui), and a version combine both core logic and ui jetstream. It just that, we need document a bit more clear here - for old generation people.
  • We have suffix without explaining on build document (not all is familiar outside google - like extern, compiled - that equivalent min I know but we need that explaination), then omg~ we even have compiled.min version on CDN like https://www.jsdelivr.com/package/npm/shaka-player and https://cdnjs.com/libraries/shaka-player that add greatly to the confusion.
  • Just now we have shaka-player.ui.js, if we follow convention - it is suppose to be shaka-player.ui.compiled.js, right ? It just small detail but…

For now, I’ll just create pull request for dist, just letting you know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[build] missing dist directory except run all.py first #2973 - GitHub
If we don't run all.py first, we running into bug missing dist directory when build/apps.py , build/build.py , build/check.py .
Read more >
python - How to keep .py files in directory, but exclude in build ...
I currently have a working directory that contains 1) source distribution 2) build distribution 3) src folder containing my package which ...
Read more >
Including files in source distributions with MANIFEST.in
The following files are included in a source distribution by default: all Python source files implied by the py_modules and packages setup() arguments....
Read more >
Using PyInstaller to Easily Distribute Python Applications
PyInstaller gives you the ability to create a folder or executable that ... First, try running the executable from a terminal so you...
Read more >
Easy Steps to Create an Executable in Python Using PyInstaller
PyInstaller creates a distribution directory, DIST containing the main executable and the dynamic libraries bundled in an executable file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found