Skip to content

Problem: Search Path Location is not Reasonable when Embedding in Other Scripting Engines #1959

@anonhostpi

Description

@anonhostpi

As discussed in this PR with @slozier ( #1957 (comment)), we may want to fix how the Search Path (and any other applicable paths) are resolved when embedding in another scripting engine such as PowerShell.

Since, IronPython uses the executing assembly as the default location, embedding it in PowerShell with the Import-Module 'IronPython.dll' command causes the Search Path to resolve to PowerShell's installation directory. This doesn't seem like the intended behavior.

I'm opening this issue before working on a PR, as we may want to discuss how we identify when IronPython is embedded in a scripting engine first, so that we don't accidentally change the behavior for when IronPython is embedded in a regular application/used as a general shared library.

Obviously, detecting the usage of PowerShell-Specific namespaces and assembly locations may be one option, but we may want to explore others in case we want to address interop with other langs.

For the latter, we would also have to identify what those languages/engines might be. I think we have 2 options here:

  • Scope this issue to CLR/C#-powered engines like IronRuby or any of the Microsoft languages like PowerShell/VB/ClearScript/etc
  • Scope this issue to just PowerShell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions