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

[BUG]: Load ShortInfo incorrectly when a single compiler coexists with a CMake compiler. #6380

Open
16bit-ykiko opened this issue Apr 21, 2024 · 2 comments
Assignees
Labels

Comments

@16bit-ykiko
Copy link

Describe the bug

Hi, I am developing a VSCode extension for convenient usage of Compiler Explorer. Everything goes well through the given API. However, inconsistency occurs when I try to load the URL returned by "api/shortener".

Steps to reproduce

The problem can be easily reproduced by following these steps. First, I have a simple URI: https://godbolt.org/z/zWMe5qEjq. The only notable point is that it has compilers for both the Tree Editor and the normal Editor at the same time.

Then I use the code below to retrieve the information and regenerate the link:

import axios from 'axios';
const headers = { 'Content-Type': 'application/json', };
const response1 = await axios.get("https://godbolt.org/api/shortlinkinfo/zWMe5qEjq", { headers: headers });
const response2 = await axios.post("https://godbolt.org/api/shortener", JSON.stringify(response1.data), { headers: headers });
const url = response2.data.url;

One possible result is https://godbolt.org/z/Kza7o1vs7.

Expected behavior

In most time, open the new uri have the same editors and compilers with the old, but in this case, it doesn't, missing all compilers for normal editor.

Old:
image

New:
image

Reproduction link

Not applicable

Screenshots

Not applicable

Operating System

No response

Browser version

No response

@16bit-ykiko
Copy link
Author

16bit-ykiko commented Apr 21, 2024

This also happens when there are executor onlys, test URL: https://godbolt.org/z/M6aW5719r.

@partouf partouf self-assigned this May 14, 2024
@partouf
Copy link
Contributor

partouf commented May 14, 2024

The reason this is happening, is because when there's a tree, the UI generation has a special layout where it's hard to consider other elements because of the math and structure involved. But I'm going to give it a go nonetheless.

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

No branches or pull requests

2 participants