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

Usage of external project resources #125

Open
vchekan opened this issue Jan 18, 2019 · 4 comments
Open

Usage of external project resources #125

vchekan opened this issue Jan 18, 2019 · 4 comments

Comments

@vchekan
Copy link
Contributor

vchekan commented Jan 18, 2019

Describe the bug
There are 2 resources used in paket.dependencies as github urls. This is not desirable as we do not have control over those and they can be removed any time and will break project.

github 7sharp9/FSharp.TypeProviders.SDK:generator src/ProvidedTypes.fs 
github 7sharp9/FSharp.TypeProviders.SDK:generator src/ProvidedTypesTesting.fs 
...
github enricosada/dotnet-proj-info test/dotnet-proj.Tests/FileUtils.fs

Expected behavior
If we use dependencies, it is better to relay on nuget packages which have much stricter removal rules.

@7sharp9
Copy link
Contributor

7sharp9 commented Feb 1, 2019

If you truly want to remove these then there needs to be merges to the TP SDK, last I tried the changes were not acceptable, hence my fork. Essentially a breaking change was made rendering a public property internal. Since then I have added a more fully defined reflection implementation around custom attributes

@7sharp9
Copy link
Contributor

7sharp9 commented Feb 11, 2019

I asked and the custom attribute reflection changes seem likely to be accepted, it still leaves the issue of an internal type being needed. I'll look at that after Ive done the custom attribute PR, it low priority for mw right now though.

@7sharp9
Copy link
Contributor

7sharp9 commented Feb 25, 2019

Ive tried to consolidate as much as possible with the upstream repo here:
https://github.com/7sharp9/FSharp.TypeProviders.SDK/commit/d00e35d2030bf346aaa264bc8323aa88fd3980f0
https://github.com/7sharp9/FSharp.TypeProviders.SDK/commit/5dd0739e04416e53222e3a179038b99ad2611e86

Theres a discrepancy between the way we use providedtypes and the runtimes use of of RunTimeType, as such theres no way to PR our changes that allow ProvidedRecords to function as the RunTimeType of the attribute necessary by the reflection runtime to create the CustomAttribute.

We currently will hit this code:
https://github.com/fsprojects/FSharp.TypeProviders.SDK/blob/master/src/ProvidedTypes.fs#L7471

Due to all types used by the standard provided type code are being wrapped with ILMethodDef and ILTypeDef etc. This was done to allow cross assembly references to be easier to use. The problem we have is we don't use the standard type provider mechanism, we merely use it as a skeleton so our code never has the internal types inside the ProvidedTypeDefinition wrapped with a non RunTimeType which means we can use Invoke as normal as we have simple RunTimeTypes.

@7sharp9
Copy link
Contributor

7sharp9 commented Feb 28, 2019

This is being discussed here: fsprojects/FSharp.TypeProviders.SDK#291

eventually I hope...

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

No branches or pull requests

2 participants