Skip to content

Commit

Permalink
Release of version 1.923
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Jul 20, 2017
1 parent ab69512 commit 84d77b2
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 15 deletions.
97 changes: 97 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,103 @@ This file describes changes in recent versions of modules-tcl. It primarily
documents those changes that are of interest to users and admins.


Changes in modules-tcl-1.923 (2017-07-20)
-----------------------------------------

* Fix 'aliases' command when a global or user RC file is set.
* Find and solve global or user RC aliases and symbolic versions on
'search', 'whatis' and 'paths' commands.
* Do not look at currently loaded modules to resolve the target of a module
alias.
* Rework default and latest versions search on 'avail' command. Correct
display when at a given level a sub-directory element is last element in
directory among modulefiles. Previously sub-directory was printed but
last file among modulefiles was also printed (2 latest versions at the
same level). A directory tagged "default" does not appear anymore in
default listing result as its content (the default version found in that
directory) will be displayed.
* When an alias is set and overrides name of an existing directory, take
this alias into account for default and latest choice and ignore
directory content.
* Bad default set will lead to no result displayed for the corresponding
module in case of default 'avail' display.
* Correct inclusion of aliases in output result when these aliases are not
part of the exact same module path than module path of the search.
* Rewrite existing shell initialization file with initadd, initprepend,
initswitch, initrm and initclear commands rather than writing a new
file then copying this new file to replace the existing initialization
file. In addition only re-writes shell initialization file if its content
need to be altered.
* Raise an error on initadd, initprepend, initswitch, initrm and initclear
commands when no 'module load' line are found in shell initialization
file.
* Normalize error messages for the various collection-related commands
when collection cannot be accessed.
* Cleanup existing reference counters of a path list variable when this
variable is altered by a 'setenv' or an 'unsetenv' command.
* Init: do not pollute tab-completion with moduleraw command. (Bert Wesarg)
* Make use of the same Tcl interp for each modulefile interpretation and
use another one for each modulerc (but the same for each modulerc). By
doing so we proceed like on C-version where same interpreter is used
across modulefile or modulerc interpretation. Huge performance
improvement is achieved with this change on commands making intensive
use of interp like 'avail'. Interpreter state is reset from one
interpretation to another: the initial variable and procedure state is
restored before each new interpretation to avoid spread of definitions
from one interpretation to another. Also in case of nested interpretation
each interpretation level has its own interpreter so a module loaded by
another does not influence the interpretation of the module loading it.
* Improve performance of aliases and symbolic versions resolution by
computing these resolution at definition time. As a consequence
resolution loop are not registered anymore and produce an error message
when spotted not at display time.
* Reduce number of 'access' system call by trying access to modulefile
when reading the content of a modulefile directory rather testing access
before trying it.
* No error raise on empty argument list for load. To cope with initadd
behavior that requires at least an empty 'module load' line in startup
files. (fix SF bug#88)
* Fix initadd to handle load line without trailing space. Was previously
expecting load directive to be written 'module load ' to get a match.
With fix, 'module load' line will also be matched.
* Like C-version catch raised error when break or continue are called from
outside of a loop to handle them as when they are called from modulefile
main body. (fix SF bug#87)
* Return error on 'module use' command when an empty path string is
provided rather ignoring it.
* Workaround 'min' and 'max' functions and 'lreverse' procedure for correct
operations under Tcl version 8.4.
* Install: add --with-tclsh configure option to give the ability to choose
the Tcl interpreter shell to setup in initialization scripts.
* Handle error raised from the ModulesDisplay, ModulesHelp and ModulesTest
procedures in the same way than for the evaluation of the modulefile
content. An error occurring during the evaluation of the modulefile
content will lead to no evaluation of the 'display', 'help' and 'test'
command specific functions.
* Remove 'debug' module command
* Doc: describe 'path', 'paths' and 'autoinit' module command.
* Correct use of xrdb tool when not installed in default path.
* Fix 'init*' module commands to behave more like C-version and document
remaining differences in diff_with_c-version.
* Init: make 'sh' init script closer to POSIX specification to support sh
flavors different than Bash or Zsh like Dash.
* Fix column-mode display for very short width terminal.
* Install: introduce an 'install' non-regression testsuite which is
triggered by the 'make testinstall' command and checks modules-tcl
installation is operational.
* Init: fix modulerc load test on 'fish' init script.
* Init: fix interactive shell test on 'sh' init script.
* Install: add --enable-example-modulefiles configure option that install
by default some modulefiles provided as example in the system modulefiles
directory.
* Install: when uninstalling, do not remove modulefiles directory if it is
not empty.
* Add completion script for Zsh shell.
* Add 'module test' command to trigger when called execution of a
ModulesTest procedure in target modulefile following same kind of
mechanism than 'module help'.


Changes in modules-tcl-1.832 (2017-04-29)
-----------------------------------------

Expand Down
9 changes: 7 additions & 2 deletions contrib/rpm/modules-tcl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%{!?_licensedir:%global license %%doc}

Name: modules-tcl
Version: 1.832
Version: 1.923
Release: 1%{?dist}
Summary: Native Tcl version of the Environment Modules system

Expand Down Expand Up @@ -122,7 +122,7 @@ fi

%files
%license COPYING.GPLv2
%doc ChangeLog NEWS README.txt doc/diff_with_c-version.txt
%doc ChangeLog NEWS README doc/diff_with_c-version.txt
%{_sysconfdir}/modulefiles
%if 0%{?fedora}
%ghost %{_sysconfdir}/profile.d/modules.csh
Expand All @@ -148,6 +148,11 @@ fi
%{macrosdir}/macros.%{name}

%changelog
* Thu Jul 20 2017 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 1.923-1
- Update to 1.923
- Use --disable-example-modulefiles configure option to avoid example
modulefiles installation

* Sat Apr 29 2017 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 1.832-1
- Update to 1.832
- Use --disable-doc-install configure option to handle doc instalation
Expand Down
33 changes: 23 additions & 10 deletions doc/source/diff_with_c-version.pod
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ C-version redirects output made on stdout in B<ModulesHelp> Tcl procedure to std

During an B<help> sub-command, only the B<ModulesHelp> Tcl procedure of a modulefile is interpreted on C-version. Tcl-version interprets all the content of the modulefile, then call the B<ModulesHelp> procedure if it exists.

Since C<v1.923>: on Tcl-version B<ModulesHelp> subroutine is not ran if an error occurred during the interpretation of the I<modulefile> main body.

=item B<display>

Since C<v1.923>: on Tcl-version B<ModulesDisplay> subroutine is not ran if an error occurred during the interpretation of the I<modulefile> main body.

=item B<avail>

On C-version, the same Tcl interpreter is used for the interpretation of all F<.modulerc> or F<.version> files during an B<avail> command but the state of this interpreter is not reset between each interpretation. So some variable and procedure definitions may spread from one interpretation to another.

=item B<load>

On Tcl-version the value of an environment variable is set even if the new value is the same as the current value of this variable in environment.
Expand Down Expand Up @@ -104,7 +114,7 @@ On Tcl-version code passed to the B<exit> Modules specific Tcl command will not

=item B<module-version>

Since C<v1.XXX>: in case the specified aliased module or the symbolic version introduces a resolution loop with already defined aliases or symbolic versions, this new alias or symbolic version is not registered and an error message is raised. On C-version and on previous Tcl-version releases, alias or symbolic version introducing loop are registered as the modulefile resolution is not computed at registration time.
Since C<v1.923>: in case the specified aliased module or the symbolic version introduces a resolution loop with already defined aliases or symbolic versions, this new alias or symbolic version is not registered and an error message is raised. On C-version and on previous Tcl-version releases, alias or symbolic version introducing loop are registered as the modulefile resolution is not computed at registration time.

=item B<module-info>

Expand All @@ -128,11 +138,11 @@ During a B<switch> sub-command, I<unload> then I<load> is returned instead of I<

=item B<module-info version>

Since C<v1.XXX>: declared aliases or symbolic versions are not registered anymore if they introduce a resolution loop. As a result B<module-info version> does not return an I<*undef*> string value as it does not face resolution loop situation anymore.
Since C<v1.923>: declared aliases or symbolic versions are not registered anymore if they introduce a resolution loop. As a result B<module-info version> does not return an I<*undef*> string value as it does not face resolution loop situation anymore.

=item B<module-info symbols>

Since C<v1.XXX>: declared aliases or symbolic versions are not registered anymore if they introduce a resolution loop. As a consequence symbolic versions introducing loop situation are not part anymore of the B<module-info symbols> returned result as they are not registered.
Since C<v1.923>: declared aliases or symbolic versions are not registered anymore if they introduce a resolution loop. As a consequence symbolic versions introducing loop situation are not part anymore of the B<module-info symbols> returned result as they are not registered.

=back

Expand All @@ -152,6 +162,13 @@ When multiple words are passed as argument to B<module-whatis> but they are not

=back

=head2 Locating Modulefiles

On Tcl-version when a module alias is set and overrides name of an existing directory, this alias is taken into account to locate the default version of this module name and the I<modulefiles> locating in the directory are ignored.

Since C<v1.832>: when looking for an implicit default in a I<modulefile> directory, aliases are taken into account in addition to I<modulefiles> and directories to determine the highest numerically sorted element.

Since C<v1.832>: distinguish access issue (permission denied) from find issue (cannot locate) when trying to access directly a directory or a modulefile as done on B<load>, B<display> or B<whatis> commands. In addition, on this kind of access not readable F<.modulerc> or F<.version> files are ignored rather producing a missing magic cookie error.

=head1 Features specific to the Tcl-version

Expand Down Expand Up @@ -201,11 +218,13 @@ These command line switches are not supported on C-version.

=item B<autoinit>

=item B<aliases>

These module sub-commands are not supported on C-version.

=item B<test>

This command appeared on C<v1.XXX> and is not supported on C-version.
This command appeared on C<v1.923> and is not supported on C-version.

=item B<avail>

Expand Down Expand Up @@ -244,9 +263,3 @@ This B<module-info> option is not supported on C-version.
=back

=back

=head2 Locating Modulefiles

Since C<v1.832>: when looking for an implicit default in a I<modulefile> directory, aliases are taken into account in addition to I<modulefiles> and directories to determine the highest numerically sorted element.

Since C<v1.832>: distinguish access issue (permission denied) from find issue (cannot locate) when trying to access directly a directory or a modulefile as done on B<load>, B<display> or B<whatis> commands. In addition, on this kind of access not readable F<.modulerc> or F<.version> files are ignored rather producing a missing magic cookie error.
4 changes: 2 additions & 2 deletions modulecmd.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ echo "FATAL: module: Could not find tclsh in \$PATH or in standard directories"
#
# Some Global Variables.....
#
set MODULES_CURRENT_VERSION 1.920
set MODULES_CURRENT_RELEASE_DATE "2017-07-19"
set MODULES_CURRENT_VERSION 1.923
set MODULES_CURRENT_RELEASE_DATE "2017-07-20"
set g_debug 0 ;# Set to 1 to enable debugging
set error_count 0 ;# Start with 0 errors
set g_autoInit 0
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h3 class="panel-title">C version</h3>
<h3 class="panel-title">Tcl version</h3>
</div>
<div class="panel-body">
<a href="https://sourceforge.net/projects/modules/files/Modules-Tcl/modules-tcl-1.832.tar.gz/download">1.832</a> released on 2017-04-29 (<a href="tcl/NEWS.html">NEWS</a>)
<a href="https://sourceforge.net/projects/modules/files/Modules-Tcl/modules-tcl-1.923.tar.gz/download">1.923</a> released on 2017-07-20 (<a href="tcl/NEWS.html">NEWS</a>)
</div>
</div>
</div>
Expand Down

0 comments on commit 84d77b2

Please sign in to comment.