Skip to content

Commit

Permalink
fixed newPackage to permit terminal null entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud committed Aug 25, 2024
1 parent b84ba07 commit b0cef92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions M2/Macaulay2/m2/packages.m2
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ getpkgNoLoad = pkgname -> if isPackageLoaded pkgname then value PackageDictionar
-----------------------------------------------------------------------------

newPackage = method(
Dispatch => Thing,
Options => {
Authors => {},
AuxiliaryFiles => false,
Expand All @@ -224,6 +225,7 @@ newPackage = method(
UseCachedExampleOutput => null,
Version => "0.0"
})
newPackage Sequence := opts -> x -> newPackage splice(nonnull x, opts) -- to allow null entries
newPackage String := opts -> pkgname -> (
-- package name must be alphanumeric
checkPackageName pkgname;
Expand Down
1 change: 1 addition & 0 deletions M2/Macaulay2/packages/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ foreach(_target IN LISTS _target_prefixes)
add_custom_target(${_target}-packages DEPENDS ${${_dependencies_list}})
endforeach()

# Makes the target all (possibly) depend on info-packages and install-packages
set_target_properties(${_all_target_list} PROPERTIES EXCLUDE_FROM_ALL OFF)

#################################################################################
Expand Down
2 changes: 2 additions & 0 deletions M2/Macaulay2/packages/Macaulay2Doc/functions/package-doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
--- author(s): Mahrud
--- notes: functions below are all defined in packages.m2

undocumented (newPackage, Sequence)

doc ///
Node
Key
Expand Down

0 comments on commit b0cef92

Please sign in to comment.