-
Notifications
You must be signed in to change notification settings - Fork 311
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
Add ylc compiler #1441
Add ylc compiler #1441
Conversation
bin/yaml/ygen.yaml
Outdated
fetch: https://github.com/Cr0a3/ygen/archive/refs/heads/main.zip | ||
script: | | ||
cd ygen-main | ||
sudo apt install rust -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Sorry - but we can't do this: the system has no sudo
and installing rust
like this won't work across all our systems.
I replied on the feature request you opened (and then closed) - you'll probably need us to help and/or work with you to add support for building rust-based compilers like we build all our other compilers (C, C++, python, Rust itself, etc) with our misc-builder
or clang-builder
or ***-builder
repositories.
Just copying the binary here might not work long-term: this doesn't copy any DLLs it may need too. We can help with this though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I did not think of this.
Luckily ylc does not depend on any dlls cuz it uses my own written code generation library.
Another way for builds is I could add a GitHub workflow which would build the toolchain in my main repo, release it with the commit id, which would then be downloadable (or just create a pr to misc-builder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A PR to misc-builder means we would do the CI ourselves with infrastructure that "guarantees" it will run. But also an installable binary for an old Ubuntu would work too, or even better statically linked against MUSL to make it truly standalone.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it, so now it should download my pre build.
So it's now just a normal download
compilers: | ||
ygen: | ||
ylc: | ||
type: ziparchive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will download and install just once - which is probably not what you want for a "newest".
If you would like this to be installed every night , we will need an:
if: nightly
and then something to make it want to install every time. Some things have nightly
as the type but I think we can add:
always_install: true
too.
When you support tagged stable releases we can revist so only the nightly gets installed this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks: confirmed this now works. But it will only install once. I assume that's OK as you didn't reply to the comments above.
bin/yaml/ygen.yaml
Outdated
ygen: | ||
ylc: | ||
type: ziparchive | ||
fetch: https://github.com/Cr0a3/ygen/tree/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing the url:
parameter. I suspect you need that. Maybe fetch
should be url
?
RuntimeError: Missing required key 'url' in compilers/ygen/ylc newest
If I make that change locally then it does'nt know how to find "newest". You URL needs to somehow contain {name}
in order to specify the target.
I can't see any releases on https://github.com/Cr0a3/ygen/releases so I don't know what URL you need to specify to download the built compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a little script which automatically builds my project and force pushes the changes to the build branch which this script should download
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not do that.
You can test this locally with:
(this will try and instlal to |
Thank you, i found out when using wsl (which i do) you cannot use Anyway it now locally works.
Thank you for all your support |
@mattgodbolt can you also help me over the
|
compilers: | ||
ygen: | ||
ylc: | ||
type: ziparchive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks: confirmed this now works. But it will only install once. I assume that's OK as you didn't reply to the comments above.
It's not finding any compilers: probably as you have added them to the "amazon" settings which is the correct place to get them on the live site. However, it's not the configuration your system will use (else it would try and run on our amazon setup). You can test locally by either copying the config to Sorry it's so complex! There's some docs on adding a compiler and adding a language that you may already have seen but I'll link here. |
Confirmed installed ok. thanks |
(Noting that the path here is just "ygen" so you won't be able to add versions later without changing a few things) |
Oh, sorry I forgot to include it (can you quickly add the needed flag or should I create another pr)? |
I'll have to do some work to change it on my side as it will have been baked into our permanent image. Will make that change now though. |
Hi dear godbolt team, > Before opening the PR, please make sure that the tests & linter pass their checks, > by running `make check`. With this pr i added support for the ylc compiler. Infra-PR: compiler-explorer/infra#1441
Hi dear godbolt team,
I added a new compiler called ylc from my project ygen.
It is a rust package so i hope i done everything right.
It's my first time to contribute to godbolt so please say everything i did wrong
Bye
Cr0a3