update-tags is called from two places `update-tags` itself and also
as as part of `update`. Silently ignoring the absence of git should
only happen in the later case. If the user explicitly ask for
update-tags we should hard fail as normal.
"emsdk install emscripten-master-64bit" is currently dependent on
whether emscripten node is installed or not.
This change allow using system-provided node / npm command to proceed
the installation. Also clarify the error message.
- Remove empty llvm-tags-32bit.txt
- Remove code that executes if llvm-tags-64bit.txt is missing (it
can't be since its checked in these days).
- Cleanup load_file_index_list
I verfied manually that llvm_precompiled_tags* list are identical
before and after this change.
This PR has three changes:
1) Fixing --permanent flag:
The previous algorithm looped over the values of PATH 4 times to check conditions while these conditions are the opposite of each other. Also, the result did not include all the parts in the whole_path.
I have combined these loops and fixed the algorithm, so no path is lost. Now using --permanent the PATH and Env variables are correctly updated.
2) Fixing --system flag:
Now, the system flag does not cause the PATH values to be overwritten/clobbered. The PATH/Env variables are correctly updated.
3) Fixing flagless flag:
When no flag is provided the value of process/shell is correctly updated and preserved.
This adds the tests for all the situations.
Fixes#634Fixes#645
Also switch PostMessage to SendMessageWithTimeout and only send one if
environment variables actually changed.
Also, enable and fix --permanent unit tests.
Fixes: #587
> If nodejs is not installed by `emsdk`, the output ".emscripten" file by `emsdk activate` will look like this.
>
> ```python
> NODE_JS = ''/usr/bin/nodejs''
> # too many quotes
> ```
>
> `emcc` fails to execute by this syntax error.
>
> I think fixing [this line](https://github.com/emscripten-core/emsdk/blob/1.40.1/emsdk.py#L1450) could be a solution.
>
> ```python
> activated_config['NODE_JS'] = "'%s'" % node_fallback
> # the value will be quoted later again
> ```
I think this is less surprising than continuing to support latest-fastcomp
with the last fastcomp release. That's technically correct - the last release
is 1.40.1, and always will be - but when a user asks for "latest" I think they
want something up to date. Instead, give a clear error that indicates how
they can get an actually up to date build, by using upstream.
* Improve activation message
The activation message is now IMHO more informative and
actionable:
```
$ emsdk activate latest
Setting the following tools as active:
node-12.18.1-64bit
releases-upstream-e7e39da9c81faecd9ecf44065cee864d76e4e34d-64bit
Next steps:
- To conveniently access emsdk tools from the command line,
consider adding the following directories to your PATH:
$HOME/wasm/emsdk
$HOME/wasm/emsdk/node/12.18.1_64bit/bin
$HOME/wasm/emsdk/upstream/emscripten
- This can be done for the current shell by running:
source "$HOME/wasm/emsdk/emsdk_env.sh"
- Configure emsdk in your bash profile by running:
echo 'source "$HOME/wasm/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile
```
* .
embedded mode as been the default since #472 and I included
`--no-embedded` as an option during the interim time, but to simply
the code and avoid have two modes of operation I think its safe
to now remove the non-embedded mode.
On platforms with no supported binary SDKs to download, find_sdk
can return None which caused a check in the "list" command to fail.
Checking for the return value before making method calls fixes this,
and allows Linux/ARM64 to run "emsdk list" and then build an SDK
from source.
Fixes https://github.com/emscripten-core/emsdk/issues/548
Remove the optional argument to contruct_env. It simple if we
always construct the env in the same place. Avoid using temp files,
and avoid changing directory.
Also accept -h for help.
This is the usual behaviour of most utils that accept --help.
Also, now an empty call to ./emsdk does not print the full help, as
discussed in #509.
This expands on #460 which added a file in each install dir
with the version, that lets us know not to re-download it. That
didn't integrate with is_installed, so it wasn't reported properly,
which this PR fixes.
With this we can remove a hack for python, as we can simply
not install anything if it's already installed (see line 1859).
Also add the "INSTALLED" indicators on the main listings in
"emsdk list".
Bug was reported in #477
"Legacy" here meaning anything using only < 1.38.0, and anything
using 'nightly' mozilla builds (which have not been done for years).
This also lets us remove node 4.1.1 (but not 8.9.1).
Ooops, I guess even the most innocent-seeming change can have
unintended consequences. Switching to embedded by default will at
least make this path more tested in the future.
Fixed#497
If `is_installed` doesn't return true after install than something
serious went wrong so make this into a warning.
Also, clean up couple of places to make the python code more
readable.
This allows `emsdk_env.sh` to work under bash for windows even in the
absence of the `MSYSTEM` environment variable (which seems to be
the setup on circle CI.