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

Don't parse compiler version if toolchainRequirements is not used #1671

Closed
jacob-carlborg opened this issue Mar 13, 2019 · 2 comments
Closed
Labels
good first issue Good for newcomers to fix in a PR

Comments

@jacob-carlborg
Copy link
Contributor

Compiling a project using LDC nightly build I got the follow error: Invalid SemVer format: 1.15.0git-e3e96b8 [1]. 1.15.0git-e3e96b8 is the version of LDC. The dub.json file does not contain toolchainRequirements.

[1] https://travis-ci.com/jacob-carlborg/dvm/jobs/184455053#L222

@wilzbach
Copy link
Member

This is related to #1571 as now the compiler version is parsed on every target generation. In particular, for ldc parseDependency is called which tries to parse 1.15.0git-e3e96b8 as a SemVer dependency and thus subsequently fails.

See also:

checkPkgRequirements(m_project.rootPackage);

package bool addRequirement(ref ToolchainRequirements req, string name, string value)
{
switch (name) {
default: return false;
case "dub": req.dub = parseDependency(value); break;
case "frontend": req.frontend = parseDMDDependency(value); break;
case "ldc": req.ldc = parseDependency(value); break;
case "gdc": req.gdc = parseDependency(value); break;
case "dmd": req.dmd = parseDMDDependency(value); break;

@Geod24
Copy link
Member

Geod24 commented Oct 18, 2022

I think the issue is fixed now, as LDC has moved to a semver correct scheme, and @wilzbach has mentioned that this parsing is needed.

@Geod24 Geod24 closed this as completed Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers to fix in a PR
Projects
None yet
Development

No branches or pull requests

3 participants