-
Notifications
You must be signed in to change notification settings - Fork 636
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
node docs generator tool without MetaDataLoadContext #11950
Conversation
remove metadata references
add console colors for dictionary related errors update readme
|
||
if (!string.IsNullOrEmpty(pathManager.HostApplicationDirectory)) | ||
{ | ||
var hostDir = new DirectoryInfo(Path.Combine(pathManager.HostApplicationDirectory, FALLBACK_DOC_DIRECTORY_NAME)); |
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.
@sm6srw to answer your question about how useful this is - it actually uses the DynamoHostPath
property as the root - which can be set using a startupconfiguration - for example, DynamoRevit sets this to the location of the DynamoRevit.dll
entry point.
so I think this is pretty useful.
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 have made a first pass but I need to come back and take another pass on all new files. Looks good. Just a few questions.
private PackageDocumentationManager() { } | ||
|
||
/// <summary> | ||
/// Retrieves the markdown node documentation file associated with the input node namespace | ||
/// </summary> | ||
/// <param name="nodeNamespace">Namespace of the node to lookup documentation for</param> | ||
/// <returns></returns> | ||
public string GetAnnotationDoc(string nodeNamespace) | ||
public string GetAnnotationDoc(string nodeNamespace, string packageName) |
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.
Add packageName to param list?
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.
yes @sm6srw, I had the same reaction initially, https://github.com/DynamoDS/Dynamo/pull/11725/files#r646888243 - but it's actually inside an extension, I think it's okay to break this with chance of risk and if possible it would be nice to decide and/or codify extensions being part of the API boundary or not but it will take a cross team effort / discussion I think.
in this case I'm okay with the change unless there are objections.
move ilibraryviewcustomization as well to dynamocore
so the what was the reason for the move from Wpf to Core ?
|
|
||
private static List<MdFileInfo> ScanFolderForAssemblies(string inputFolderPath, IEnumerable<string> filter, IEnumerable<string> referencePaths, SearchOption searchOption) | ||
{ | ||
var allAssembliesFromInputFolder = Directory.GetFiles(inputFolderPath, "*.*", searchOption) |
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.
Not sure how many filles we expect to parse here.
EnumerateFiles
might have some benefits...
The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.
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'd rather stick with the simplicity of GetFiles()
- this is not going to affect users, and image compression time completely dwarfs the time it takes to read these files.
I'm thinking back to the last time I ran into trouble groking deferred execution and EnumerateFiles
.
src/Tools/NodeDocumentationMarkdownGenerator/Commands/FromDirectoryCommand.cs
Outdated
Show resolved
Hide resolved
<OutputType>Exe</OutputType> | ||
<RootNamespace>NodeDocumentationMarkdownGenerator</RootNamespace> | ||
<AssemblyName>NodeDocumentationMarkdownGenerator</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
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.
Looking at the PR and at the Readme (The NodeDocumentationGenerator is a CLI tool to generate node documentation markdown stubs.
) it seems that there is no UI being done in this project.
What are the reasons for making this project use the full dotnet framework (instead of core or dotnet standard)
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's not clear to me that it's so simple to have a .net standard project depend on assemblies targeting .net framework (they are different targets after all) and this PR is big enough dissuade me from trying to also include multi-targeting our core dynamo assemblies for .net standard.
If I can simply change the target to .net standard and everything works I'm fine with that 😉 - otherwise I think it's probably best to include that improvement later.
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.
from stack overflow
No, .NET Standard projects cannot reference framework projects.
.NET Standard projects need to be usable across platforms, forcing a dependency on the .NET framework by referencing an assembly targeting it makes this impossible.
Note that with some of the magic Microsoft is doing with .NET Standard 2.0 this is less true but the overall idea still stands.
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 answer may be old, so I'll try it.
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.
Yeah..dotnet standard probably cannot reference dotnet framework....
Unless we take on the gigantic task of braking apart the dependencies into standard vs non standard assemblies
Fine with this even if it stays as it is
How are we going to test the new functionality ? Unit tests (with mocked input files....?) ? |
I moved them because I wanted to
|
I am working on a test PR here: |
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.
LGTM
Purpose
Please see @SHKnudsen's PR for a great summary:
#11725
differences between the PRs:
MetaDataLoadContext
support has been removed for the current time, and we'll explore its necessity when we deploy this tool. This removes ~ 700 LOC.-g
-v
mode- I found helpful to track down some issues.TODO:
Declarations
Check these if you believe they are true
*.resx
files