Skip to content

Release 6.4.0 - #3279

Merged
jmcouffin merged 67 commits into
masterfrom
develop
Apr 10, 2026
Merged

jmcouffin merged 67 commits into
masterfrom
develop

Conversation

@jmcouffin

Copy link
Copy Markdown
Contributor

No description provided.

tay0thman and others added 30 commits April 5, 2026 02:35
ADC v2027 (v7.8.1.11) removed the .NET 8-compatible API DLL from
FOS/AddInProcess/Civil3DOE. Both remaining API CLSsurfaces (legacy API.dll
and new API.Public.dll) were compiled against .NET Framework's unified
System.ServiceModel, making them unusable on Revit 2025/2026 (.NET 8).

Fix: three-tier fallback in adc.py
- Tier 1: Public API (future-proof for when Autodesk fixes the DLL)
- Tier 2: Legacy API (ADC v15-v17, exclusive elif to prevent AppDomain poison)
- Tier 3: Filesystem fallback (process detection + workspace dir walking)

Also restructures Keynote Manager diagnostic into safe/deep tiers to
prevent WCF AppDomain poisoning during troubleshooting.

Tested on: ADC v17.x + Revit 2024, ADC v17.x + Revit 2026,
           ADC v2027 + Revit 2024, ADC v2027 + Revit 2026.

Closes #XXXX
- Apply Black formatter to both changed files
- Fix .None enum access for Black parser compatibility (getattr pattern)
- Remove partial-match from AssemblyResolve handler (exact keys only)
- Use prefix-strip instead of str.replace in path resolution
- Replace 10-char fuzzy match with full startswith comparison
- Validate workspace roots contain org dirs in filesystem fallback
- Remove dead-code guard in _determine_kfile
- Remove adc.API mutation from diagnostic _try_wcf_shim
- Add semantic version sorting for NuGet directory scanning
- earlier safeguard
- drop inverserules entirely (not interesting in this case)
…rator

Updated the logic for determining the clean engine setting in CommandTypeGenerator.cs. The new implementation considers metadata-driven settings, rocket mode compatibility, and ensures a clean engine scope is used when necessary.
Updated the UIManagerService to ensure non-nullable handling of renamedTabTitle. Modified the pyRevitExtensionParserTest.csproj to suppress additional NUnit analyzer warnings related to assertion styles. Adjusted VersionFilteringTests to ensure results are not null before asserting emptiness.
Refactored the LoadBeta property to read from the canonical key 'loadbeta' and fall back to 'load_beta' for legacy support. Updated related tests to reflect the new key usage and ensure correct parsing behavior.
Introduced IniRemoveKey method to facilitate removal of keys from INI files. Updated LoadBeta property setter to remove the legacy 'load_beta' key, ensuring only the canonical 'loadbeta' key remains in the configuration. Enhanced tests to validate the new behavior.
Refactored boolean parsing logic in the PyRevitConfig class to support various formats, including numeric and quoted values. Updated the Load method to discover configuration files more effectively. Added tests to validate the new parsing behavior for the LoadBeta property.
fix: update LoadBeta configuration handling in PyRevitConfig
- Cache PyRevitConfig.Load() as a static singleton with session-scoped invalidation
- Cache Roslyn MetadataReference list and assembly build fingerprint as statics
- Replace per-extension AppDomain.GetAssemblies() scans with pre-built HashSet lookup
- Materialize libraryExtensions.ToList() once before the command loop
- Move hook registration into C# SessionManagerService to eliminate redundant Python-side extension re-parse
- Remove icon pre-loading step (File.ReadAllBytes on every icon) that legacy loader never had
- Limit ReadPythonScriptConstants to first ~50 lines per script file
- Auto-create empty pyRevit_config.ini if missing so Python configparser can save settings
- Wire PyRevitConfig.ClearCache() into ExtensionParser.ClearAllCaches() for proper reload invalidation

Before: 14.2s (C#) vs 12.7s (Legacy) — 11% slower
After:  13.2s (C#) vs 13.3s (Legacy) — on par or faster
Enhanced the _get_reference_file function to handle scenarios where .NET Core loads framework assemblies from the shared runtime. Added logic to check for already loaded assemblies and return their locations, preventing potential loading conflicts.
add warning for view phase not changeable
Fix crash when processing inverted parameter filter rules
…-checked locking race

Agent-Logs-Url: https://github.com/pyrevitlabs/pyRevit/sessions/f0e0af65-14ac-45fa-8cdd-d0419b192b94

Co-authored-by: jmcouffin <7872003+jmcouffin@users.noreply.github.com>
- Introduced TryParseHookFileName method to encapsulate hook file name parsing logic.
- Updated CreateHookId and BuildHookSearchPaths methods to internal access modifier for better encapsulation.
- Added HookManagerTests.cs to the project for improved test coverage.
Wurschdhaud and others added 2 commits April 9, 2026 12:08
fix: restore WndProc pre-cached .NET types to prevent IronPython crash
@Wurschdhaud

Wurschdhaud commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

When running pyrevit extensions update %extension_name% --token=%token% --debug I get

 Error: too many redirects or authentication replays (pyRevitLabs.Common.PyRevitException)
   at pyRevitLabs.Common.GitInstaller.ForcedUpdate(String repoPath, GitInstallerCredentials creds)
   at pyRevitLabs.PyRevit.PyRevitExtensions.UpdateExtension(PyRevitExtension ext, GitInstallerCredentials credentials)
   at pyRevitLabs.PyRevit.PyRevitExtensions.UpdateExtension(String extName, GitInstallerCredentials credentials)
   at pyRevitCLI.PyRevitCLIExtensionCmds.UpdateExtension(Boolean all, String extName, GitInstallerCredentials credentials)
   at pyRevitCLI.PyRevitCLI.ProcessArguments()
   at pyRevitCLI.PyRevitCLI.Main(String[] args)

This is a show stopper imho

Might be related to finding 1 and 2 of @tay0thman

EDIT:
nevermind - just reinstalled 5.3.1 to double check, I get the same error there. Probably a company server issue.

@Wurschdhaud

Copy link
Copy Markdown
Contributor

Tested:

  • install / uninstall (admin installer)
  • samples of native pyRevit toolbar
  • company toolbar
  • CLI updating and switching (git) extensions
  • CLI switching clones

Didn't manage to break it further.

…-color-value-pick

Improve match clipboard and color value pick
…t files

- Added a new step in the GitHub Actions workflow to verify the presence of the LibGit2 native DLL.
- Updated project files to ensure LibGit2Sharp native DLLs are copied to the appropriate directories.
- Updated references to the new version of the git2 DLL in various release files.
- Updated the PrintLocalRevits method to use a local variable for the string representation of Revit instances before printing.
- Improved readability by explicitly calling global::System.Console.WriteLine for clarity.
- Removed the fallback mechanism to find registered extensions when the definition file is not found, preventing unnecessary network I/O.
- Updated comments to clarify the behavior when the extension.json file is missing.
@jmcouffin

Copy link
Copy Markdown
Contributor Author

1 & 2 fixed

@jmcouffin

Copy link
Copy Markdown
Contributor Author

checking 3

@tay0thman

Copy link
Copy Markdown
Contributor

Item 4 Resolved and merged!

@jmcouffin

Copy link
Copy Markdown
Contributor Author

3 done

@jmcouffin

Copy link
Copy Markdown
Contributor Author

Shouldn't pyrevit env list the cpython?

it does: Active CPython Engine Version: 3123

@jmcouffin

Copy link
Copy Markdown
Contributor Author

@tay0thman can you check 1 2 3 once the CI finishes. So that we call it a release?

@jmcouffin

Copy link
Copy Markdown
Contributor Author

but no rush!

@tay0thman

Copy link
Copy Markdown
Contributor

On it.

Address CI Warning: 
WARNING: The 'trusted-signing-account-name' input is deprecated. Please use 'signing-account-name' instead.
…cturesInstallIn64BitMode

- Changed the value of ArchitecturesInstallIn64BitMode from 'x64' to 'x64compatible' in multiple installation script files. to address CI warning
@tay0thman

Copy link
Copy Markdown
Contributor

Finding 1 — CLI pyrevit clones add fails for git clones (missing native DLL) - Fixed ✅✅
Finding 2 — it safe.directory rejection breaks clone validation Severity: Blocker for dev/testing workflow Status: ⚠️ OPEN
Finding 3 — System.Management assembly load error in pyrevit env Severity: Low (non-blocking, cosmetic) Status: ✅ FIXED
Finding 4 —.Net Crashes (WinProc) ✅ FIXED.

Tested on 2023,2024,2025,2026 and 2027. I think we should release.

@tay0thman

Copy link
Copy Markdown
Contributor

This i cannot reproduce running pyrevit env in cmd (as admin)

EDIT: Shouldn't pyrevit env list the cpython?

That was double config on my side (user + admin)

@jmcouffin
jmcouffin merged commit 06e6e81 into master Apr 10, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 New public release are available for 6.4.0.26100+0515

@Wurschdhaud

Copy link
Copy Markdown
Contributor

This i cannot reproduce running pyrevit env in cmd (as admin)
EDIT: Shouldn't pyrevit env list the cpython?

That was double config on my side (user + admin)

Interesting. Can this be detected by CLI and included as an error message?

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

Successfully merging this pull request may close these issues.

5 participants