-
Notifications
You must be signed in to change notification settings - Fork 238
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
Some questions about 4.0.2 #244
Comments
- `RefernceDomainAsemblies` made obsolete and renamed to `ReferenceDomainAssemblies` - Added extension methods `IEavuator.ExcludeReferencedAssemblies`
It is an interesting set of enhancements. So let's go through them:
|
Hello Oleg, thanks for considering my suggestions. About point 2, 'blacklisting'. Yes, I do see your criticism about the ambiguity of the 'by string' signature. However, while the one 'by Assembly' is convenient to be offered for completeness in any case (in fact I was suggesting it myself), it is also true that in most cases one wants to be able to filter before loading - that is when a 'Assembly' handle is not available (and it must not) - right because of the side effects that can be triggered (see the original touchscreen issue). So if string is too generic something else should be made available. About 3, I see that the client/server architecture is meant to be promoted by the latest releases. Our issues were like follows. EvaluatorTests.API_CodeDom.Check_ValidScript With the path If you need further details, we are still able to reproduce it. One more problem that made it difficult to find it was that the behaviour in debug mode or in usual run mode was different. In debug mode the server didn't even respond, while in run mode it responded with the above error.
Thanks. |
Ah well, I was forgetting another important issue. calc.GetType() can you confirm that this works with CompileOnServer=false as well? In what domain are the assemblies loaded? Is this automagically done in a sandboxed appdomain? |
My turn now :)
|
About point 2. The end result that we achieved with the patch in the pre .NET 5 version was to find a way not to load some assemblies. Not loaded, not even referenced of course. Regards, |
Ah ok, I see your point. That problem is that some assemblies are chain-loaded, being triggered by dependencies. In this respect, not referencing as 'top-level' deps is unfortunately not enough. |
Hello again Oleg, about point 3, just know that my colleague's PC is Win7. Instead, the previous discussion made me realize that the present SetRefAssemblyFilter() implementation is probably flawed with respect to the original touchscreen issue. I might be wrong, so maybe just a (dis)confirm would be enough. Sticking to the old code, public string[] GetReferencedAssemblies(string code, params string[] searchDirs); correctly returned a long list of all referenced assemblies, both directly and indirectly invoked in the code. This worked via assembly names as strings, as the list was statically determined by the cs parser, I guess, without the need to load them in advance. This method, however,
returned the loaded assemblies. I remember filtering after calling this latter didn't work, because fetching the .wmd assemblies in the appdomain address space caused everything to break: the weird system.attribute not found error. In fact, that was actually my first attempt, but it didn't work. To avoid that issue, the fix was to return the assemblies list as strings
and filtering before loading. Fortunately the internal representation was as strings,
but after a quick glance I am afraid the new version is different. It keeps only a list of Assemblies, allowing to filter in case. I'm not sure whether this would work wrt the original touchscreen issue. Please let me know, |
- Added support for Roslyn engine (no SDK required). - Added option to configure build server ports from environment variables - Issue #245: .Net 5 SDK project, could not run "CompileAssemblyFromCode" - Issue #235: csc engine cannot compile dll - Issue #244: Some questions about 4.0.2 - RefernceDomainAsemblies made obsolete and renamed to ReferenceDomainAssemblies - Added extension methods IEvaluator.ExcludeReferencedAssemblies
Hello Oleg,
remember about the touchscreen issue and the need to offer a way to exclude assemblies? Well, other than patching the pre .NET 5 version, I've been looking at the latest Cs-script version as well, as we have just started evaluating the migration of our whole project.
Here a few suggestions:
Thanks in advance,
Marco Cecchi
The text was updated successfully, but these errors were encountered: