Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation outside FrontEnd fails , i.e.: line 55 of index.html #4

Open
rolfmertig opened this issue May 26, 2020 · 3 comments
Open

Comments

@rolfmertig
Copy link
Member

Using a terminal based interface naive installation fails due to shadowing issues:

line 55 of index.html :
<pre><small>Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; InstallFeynCalc[]</small></pre>

should be changed to
<pre><small>Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; FeynCalcInstaller`InstallFeynCalc[]</small></pre>

rolfm@Ubuntu-1904-disco-64-minimal:~$ math Mathematica 12.1.0 Kernel for Linux x86 (64-bit) Copyright 1988-2020 Wolfram Research, Inc.
In[1]:= Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; InstallFeynCalc[]
InstallFeynCalc::shdw: Symbol InstallFeynCalc appears in multiple contexts {FeynCalcInstaller`, Global`}; definitions in context FeynCalcInstaller` may shadow or be shadowed by other definitions. Loading from Wolfram Research server ... Welcome to the automatic FeynCalc installer brought to you by the FeynCalc developer team! • To install the current stable version of FeynCalc (recommended for productive use), please evaluate InstallFeynCalc[] • To install the development version of FeynCalc (only for experts or beta testers), please evaluate InstallFeynCalc[InstallFeynCalcDevelopmentVersion->True]
Out[1]= GlobalInstallFeynCalc[]`

While:

rolfm@Ubuntu-1904-disco-64-minimal:~$ math Mathematica 12.1.0 Kernel for Linux x86 (64-bit) Copyright 1988-2020 Wolfram Research, Inc.
In[1]:= Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; FeynCalcInstaller\`InstallFeynCalc[] Welcome to the automatic FeynCalc installer brought to you by the FeynCalc developer team! • To install the current stable version of FeynCalc (recommended for productive use), please evaluate InstallFeynCalc[] • To install the development version of FeynCalc (only for experts or beta testers), please evaluate InstallFeynCalc[InstallFeynCalcDevelopmentVersion->True] Downloading FeynCalc from https://github.com/FeynCalc/feyncalc/archive/hotfix-stable.zip ...done! FeynCalc zip file was saved to /tmp/m00000330871. Extracting FeynCalc zip file to /tmp/m00000330871.dir ...done! Checking the directory structure...done! Copying FeynCalc to /home/rolfm/.Mathematica/Applications/FeynCalc ...done! Setting up the help system ... Setting up the format type of new output cells ...
FeynCalc makes an extensive use of Mathematica's typesetting capabilities to format the output in a nice and easily readable manner.

However, the built-in typesetting is available only if the format type of new output cells is set to TraditionalForm. The default value is StandardForm.

Do you want to allow FeynCalc to change the default output format to TraditionalForm whenever it is loaded?

This will only affect the current FeynCalc front end session and will not modify the default behavior of Mathematica. (OK, Cancel) [OK]:

Probably the installer called in a terminal session (or Wolfram Engine) should not ask about front end session modification (of typesetting).

@vsht
Copy link
Member

vsht commented May 26, 2020

Hmm, that's weird. I've just tested it on a fresh 12.1 kernel and it went through without any issues
Bildschirmfoto vom 2020-05-26 12-46-33

Since install.m is actually a package, cf.
https://github.com/FeynCalc/feyncalc/blob/master/install.m
the symbol InstallFeynCalc should not leak into the Global context.

@rolfmertig
Copy link
Member Author

The issue happens if you put it all into the In[1]:= line, i.e.:

Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; InstallFeynCalc[]

It is a known limitation of the parser.

An alternative fix is
Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"]; Symbol["InstallFeynCalc"][]

@vsht
Copy link
Member

vsht commented May 26, 2020

I see. Does it work if one does not put both commands in one line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants