Genie Discord forum

When I work with a project in Genie Builder, what is the best way to install Dependencies? I have run into several errors where my libraries "Fail to precompile". I thought that most of these libraries were precompiled when Genie Builder was installed ๐ค
In any case, I right click on my project and run a REPL... the add and use Pkg to install the missing dependencies. The issue here, is that I still receive the same errors. Even when I do run a pkg.add(), the package is usually already listed and no changes are made to Manifest.toml.
I have taken this a step further (โ ๏ธ AND IT SEEMS LIKE A PROBLEM, SO NOBODY ELSE REPEAT WHAT I JUST DID โ ๏ธ ), by adding the pkg.add("") to my actual project's app.jl file. I think this resulted in some sort of corruption, as can be seen by the Genie Builder - scripts terminal.
So, can anyone kindly explain to me, what is the best way to add dependencies? If launching the REPL is the best way, then why did Genie Builder alert me that my dependencies could not be precompiled, when they were already added? ๐ค






I just want to add a note, that as a new Genie Builder user, I would like a to know a bit more about what happens on the back end. It seems like I have run into a lot of challenges over the past week that were probably preventable. I'm going to try and summarize what I have learned, in hopes that it could be a lesson for other new users.
- Genie Builder's obvious parts are the Server, the drag-and-drop UI Designer, and the new workspace created for each project.
- It appears that Genie Builder creates A NEW ENVIRONMENT in (for my linux install) ~/.julia/geniebuilder where individual project workspaces are created in ~/.julia/geniebuilder/apps and the dependencies are installed elsewhere... I THINK this is what has caused me a headache because Genie Builder cannot find dependencies that I KNOW that I have compiled, because my project works perfectly using Pluto, but I am having a challenge porting it over to Genie.
So, here is what I would like to better understand:
- Where are the dependencies added when Genie Builder is created?
- I had a julia environment installed prior to adding the Genie Builder extension. Do I need to switch environments in VS Code when running projects created using Genie Builder? If so, what would be the correct environment?
- What are the roles of the Manifest.toml and Project.toml files? They are stored in ~/.julia/geniebuilder as well as within each individual project workspace (such as ~/.julia/geniebuilder/apps/polynomialmanipulation/
- What are Revise cache files (~/.julia/compiled/v1.9/Revise) and how do you delete the cache files? In my case, I see two files within the directory: M1Qoh_c7J8m.ji and M1Qoh_c7J8m.so

๐ I also want to add that I appreciate all of the hard work that the Genie Builder team has put into this project. I very much appreciate the tool because I have had very little experience working with front-end... frankly, HTML and CSS are some things that I absolutely dread because I find them to be very annoying and tedious, so I have never learned them. Maybe I am just too scared ๐. But... Genie Builder simplifies this process, so again, HUGE THANK YOU TO THE TEAM!!!

hey @GenerallyClueless , thanks for the appreciation! I'll share it with the team ๐งโโ๏ธ
As for some of your questions regarding dependencies:
First, Genie Builder runs apps the same way julia does when the "--project" option is passed. That is, each app has its own Project.toml and Manifest.toml. These files keep track of the installed packages for each individual app. See here for more info
https://pkgdocs.julialang.org/v1/toml-files/
This way, someone to easily to install all dependencies with Pkg.activate(); Pkg.instantiate()
when you share your code

in Genie Builder, there's a package manager to install packages. Here's how to launch it
https://learn.geniecloud.io/guides/quickstart#add-your-julia-code
You can also install packages via the terminal, navigating to `~/.julia/geniebuilder``

Thank you @Pere, I have much to learn ๐ถ

... but I am not afraid to ask stupid questions, so I will learn fast. ๐ซก

- As for the Julia version, GB will use whatever version is in your PATH
- The cache files are from the Revise.jl package. This allows the code to be automatically reloaded when you make a change. This is much easier and faster than stop/starting the REPL

Glad to help! And keep those questions coming ๐

So...
- I moved my julia installation (.julia renamed to .julia-old)
- Then I used juliaup to reinstall julia (https://github.com/JuliaLang/juliaup)
- Then I removed all julia and GB VCS extensions... and re-added them
- then after seeing the REVISE message... I deleted M1Qoh_c7J8m.ji and M1Qoh_c7J8m.so ... but I still see that I have packages that cannot be precompiled. So I'm confused

That might be a package issue. One way to debug this is to run the app outside Genie Builder.
- Navigate to ~/.julia/geniebuilder/yourappname and execute
julia --project
- Then type in
using Pkg
Pkg.instantiate()
- and run the Genie app with
using GenieFramework
Genie.loadapp() # load app
up() # start server
- Or you can also run it with
include("app.jl")
If this fails to precompile then it is a package issue

๐ฅบ My thought was GB was relying on a different environment than my standard julia environment, so the packages installed may not have been the same versions (or might be missing from the ENV that GB was looking at). It's probably true, because I did not know about the package manager. Of course, deleting (moving) my julia 1.9 and installing a new environment was probably not the "smart" thing to do... but my name is "CLUELESS" for a reason ๐คฃ ๐ฅ ๐ฅ

GB Package Manager is freezing every time I try and install Plotly. It never passes Building WebIO:
โ 104b5d7c + WebSockets v1.5.9
cc8bc4a8 + Widgets v0.6.6
f7e6163d + Kaleido_jll v0.2.1+0
efe28fd5 + OpenSpecFun_jll v0.5.5+0
05823500 + OpenLibm_jll v0.8.1+0
Info Packages marked with โ and โ
have new versions available, but those with โ
are restricted by compatibility constraints from upgrading. To see why use status --outdated -m
Building WebIO โโโโ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c9529be473e97fa0b3b2642cdafcd0896b4c9494/build.log

However, if I use the terminal and navigate to ~/.julia/geniebuilder/ I can start a julia session and use Pkg.add("Plotly"), which takes care of everything as expected
8e850b90 + libblastrampoline_jll v5.8.0+0
8e850ede + nghttp2_jll v1.48.0+0
3f19e933 + p7zip_jll v17.4.0+0
Info Packages marked with โ and โ
have new versions available, but those with โ
are restricted by compatibility constraints from upgrading. To see why use status --outdated -m
Building WebIO โโโโ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/0eef0765186f7452e52236fa42ca8c9b3c11c6e3/build.log
Building Blink โโโโ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/08d0b679fd7caa49e2bca9214b131289e19808c0/build.log
Building PlotlyJS โ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7452869933cd5af22f59557390674e8679ab2338/build.log
Precompiling project...
28 dependencies successfully precompiled in 28 seconds. 31 already precompiled.
julia>

The only problem is that when I try to run my project, I receive the errors that it cannot precompile Plotly.... so that tells me it is not the same environment.

I really don't know what to do. I tried removing GB from VS Code and deleting related folders from ~/.julia/
However, each time I add the extension, start a new project, the behavior is the same

I can't think of anything else to do except use Genie without Genie Builder ๐

when Genie Builder starts it launches a julia REPL using whatever version is in the PATH. There isn't any configuration regarding which julia executable to use, so any issues with package installation or precompilation have to do with the way Julia is set up.
GB just runs
julia --startup-file=no --depwarn=no /Users/pere/.vscode/extensions/geniebuilder.geniebuilder-0.4.5/scripts/rungb.jl
You can try opening a terminal in VSCode and checking the path to the julia executable with
โฏ which julia /opt/homebrew/bin/julia
And do the same in a regular terminal, where things seem to be working. Then you'll see if there's two different environments.

Thanks @pere I see that both terminals use the same path ~/.juliaup/bin/julia

Originally, I had manually installed julia. As part of troubleshooting my challenges, I renamed the installation folder (to remove it from the path configured in VS Code) and ran juliaup since it is the installation method recommended by the team. Let me see if VS Code julia exe path needs to be changed...๐ค

๐ No, everything looks consistent. I had created a static link /usr/local/bin/julia, which pointed to ~/.juliaup/bin/julia so that I would not have to modify my $PATH variable.

โ So now that the environment is consistent, I'm not sure why there are challenges with Plotly (and deps of Plotly)

.... Okay, so digging a little bit deeper, I have found something interesting. THERE IS NO JULIA at ~/.juliaup/bin/julia... rather the "juliaup correct julia path" is: ~/.juliaup/julia-1.9.1+0.x64.linux.gnu/bin/julia
... so I have created two new static links to the correct (longer) julia path. One static link was placed in /usr/local/bin ( for $PATH purposes) and another static link in ~/.juliaup/bin... pointing also the the "juliaup correct julia path"
Now I have removed the entire ~/.julia folder as well as reinstalled Genie Builder again, starting with a new project
.

Seems like everything is working so far

PACKAGE MANAGER INSTALLED PLOTLY

You might not need the full PlotlyJS.jl. I've only had to use PlotlyBase.jl so far.

@Pere Thank you for clarifying about the GB environment. Your advice to use "which julia" was really helpful. I think I had blindly followed instructions online that said to add to the path ~/.julia/bin/.julia ... however that is not where juliaup had actually put the binary ๐ณ

Hello Pere, Does this make sense to you? I can manually start the server like you suggested, but I click start button I get this error.
