Closed kocoten1992 closed 4 years ago
This is a much deep problem than it seem.
Originally I want to build compiled shaka-player and shaka-player.ui but (build.py
only build uncompiled UI - why is that :disappointed: ), and right now we consider changing build system https://github.com/google/shaka-player/issues/1858.
Maybe when done switching to new build system, we could revisit this.
Yes, our build system is a mess. I'm so sorry!
This is a legitimate bug, even in the current system. Every command should create dist/, and that wouldn't be very difficult to do.
The default build includes everything (equivalent to build.py @complete
), which means it includes the UI. So I'm not sure what you mean by:
build.py
only build uncompiled UI - why is that 😞
@joeyparrish, correct me if I'm wrong, I'm just as confusing.
So the issue is missing dist
directory ? If I'm create a directory then the build pass, exit code is 0. But nothing except shaka.ui uncompiled was build, reproducing as following code:
git clone https://github.com/google/shaka-player
cd shaka-player && git checkout v3.0.5 && mkdir dist && python3 build/build.py
The reason I'm dig into this is because I'm trying to write a plugin for shaka player (and will write docs back contribute back :+1: ).
If this don't work, then the idea
python build/build.py +@complete +my_plugin.js
It should not work (but I don't see anyone complain about it, so I'm guessing it somehow work).
P/s: if you confirm this second bug, then I'll try dig into it more, atleast it should return a positive exit code instead of 0
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?
Thanks! I've figure out where I got confused.
There are 3 points:
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.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.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.
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?
What did you expect to happen? It should work
What actually happened? Except when we run
build/all.py
first and foremostIf we don't run
all.py
first, we running into bug missingdist
directory whenbuild/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:
py
commandDo you have any thoughts ?