Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

File references in "code" node in project.json should raise an error if invalid #1026

Closed
akoeplinger opened this issue Jan 3, 2015 · 7 comments
Assignees
Milestone

Comments

@akoeplinger
Copy link
Contributor

Imagine this folder structure:

├───external
│       test.cs
│
└───src
        main.cs
        project.json

and this project.json:

{
    "version": "1.0.0-*",
    "code": [
        "**/*.cs",
        "../external/test.cs"
    ],
}

main.cs has a reference to a class defined in test.cs. If I "kpm build" this it works fine.

But when I change the path from "../external/test.cs" to something else (so that the file isn't found anymore), this results in no direct error. Instead it complains about not being able to find the class in main.cs, digging for the reason is not that straight-forward anymore, especially if you imagine an easy to miss typo, or case-sensitive file match.

Direct file references in the code node should raise an error in kpm build when the corresponding file can't be found, instead of silently ignoring it.

@muratg
Copy link
Contributor

muratg commented Jan 14, 2015

#1067

@muratg muratg added this to the 1.0.0-rc1 milestone Jan 14, 2015
@StefH
Copy link

StefH commented Feb 9, 2015

Another question : Is defining the external code files using an array supported?

I thought the only support was to use a ; - separator?

{
    "code": "../path/to/somewhere.cs; ../../another/path/to/file.cs",
}

@davidfowl
Copy link
Member

arrays are supported as well.

@StefH
Copy link

StefH commented Feb 9, 2015

Hi David, in which version from the XRE is this support?

@davidfowl
Copy link
Member

Since beta1 or so

@davidfowl
Copy link
Member

This was fixed.

@troydai can you mark close this bug with the right tags?

@troydai troydai added 3 - Done and removed 1 - Ready labels Mar 5, 2015
@troydai
Copy link
Contributor

troydai commented Mar 5, 2015

@akoeplinger this bug is fixed. When individual file references for codes listed in compileFiles property is missing, exception will be raised. https://github.com/aspnet/Home/wiki/Project.json-file

@troydai troydai closed this as completed Mar 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants