Conversation

DimitriPapadopoulos

Summary

https://mathworks.com/help/compiler/isdeployed.html

The path of a deployed application is fixed at compile time and cannot change. Use isdeployed to ensure that the application uses path modifying functions, such as addpath, before deployment.

As suggested by @servoz, this fixes the case where nipype calls SPM12 Standalone, associated to Matlab Compiler Runtime (MCR) R2019a (9.6) or later. Upcoming versions of SPM12 Standalone will most probably be compiled with Matlab R2021b, and hence will be subject to this bug.

Fixes #3507.

List of changes proposed in this PR (pull-request)

  • Do not call addpath in Matlab scripts called from a deployed Matlab application.

@DimitriPapadopoulosDimitriPapadopoulos changed the title FIX: Deployed Matllab applications must not call addpath() FIX: Deployed Matlab applications must not call addpath() Sep 20, 2022
https://mathworks.com/help/compiler/isdeployed.html

	The path of a deployed application is fixed at compile time
	and cannot change. Use isdeployed to ensure that the application
	uses path modifying functions, such as addpath, before deployment.

This fixes the case where nipype calls SPM12 Standalone, associated
to Matlab Compiler Runtime (MCR) R2019a (9.6) or later. Upcoming versions
of SPM12 Standalone will most probably be compiled with Matlab R2021b,
and hence will be subject to this bug.
@codecov

Codecov Report

Base: 65.26% // Head: 65.26% // No change to project coverage 👍

Coverage data is based on head (a101d24) compared to base (8f405f6).
coverage: 0.00% of modified lines in pull request are covered.

❗ Current head a101d24 differs from pull request most recent head 72fa3bf. Consider uploading reports for the commit 72fa3bf to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3509   +/-   ##
=======================================
  Coverage   65.26%   65.26%           
=======================================
  Files         309      309           
  Lines       40870    40870           
  Branches     5380     5380           
=======================================
  Hits        26672    26672           
  Misses      13124    13124           
  Partials     1074     1074           
FlagCoverage Δ
unittests65.04% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted FilesCoverage Δ
nipype/interfaces/matlab.py78.02% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Small suggestion.

Co-authored-by: Chris Markiewicz <[email protected]>
@effigieseffigies merged commit eb779e6 into nipy:master Sep 20, 2022
@DimitriPapadopoulosDimitriPapadopoulos deleted the spm12_standalone branch September 20, 2022 19:38
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

MATLAB:mpath:PathAlterationNotSupported / Modifying the search path is not supported by MATLAB Compiler using MAtlab 2019b