From b0d9dc42351ebe3e81f2cee22a5713247ea4515a Mon Sep 17 00:00:00 2001 From: Varriount Date: Tue, 21 Oct 2014 17:02:32 -0400 Subject: Update nsis.tmpl React appropriately when the user cancels the downloading of a component. --- tools/niminst/nsis.tmpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/niminst/nsis.tmpl b/tools/niminst/nsis.tmpl index c4270081e..974def634 100644 --- a/tools/niminst/nsis.tmpl +++ b/tools/niminst/nsis.tmpl @@ -192,8 +192,14 @@ ${If} $0 == "success" ZipDLL::extractall "$TEMP\?zipName" "$INSTDIR\?dir" Delete "$TEMP\?zipName" + ${ElseIf} $0 == "cancel" + MessageBox MB_ICONQUESTION|MB_YESNO|MB_TOPMOST \ + "Download of component '?sectionName' cancelled. Continue installation process??" \ + IDYES ignore + abort ${Else} - MessageBox MB_ICONSTOP|MB_ABORTRETRYIGNORE "Error: $0" IDRETRY retry IDIGNORE ignore + MessageBox MB_ICONSTOP|MB_ABORTRETRYIGNORE|MB_TOPMOST "Error: $0" \ + IDRETRY retry IDIGNORE ignore abort ${EndIf} @@ -252,4 +258,4 @@ Function .onInit ${GetRoot} "$EXEDIR" $R0 strCpy $INSTDIR "$R0\?{c.name}" - FunctionEnd \ No newline at end of file + FunctionEnd -- cgit 1.4.1-2-gfad0 From fa775473106c393d84f172888da9c23207c89624 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 22 Oct 2014 01:54:27 +0200 Subject: fixes 'import x as y' regression --- compiler/importer.nim | 2 +- tests/modules/tselfimport.nim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/importer.nim b/compiler/importer.nim index 9e327c8f7..58b5ef8d4 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -153,7 +153,7 @@ proc importModuleAs(n: PNode, realModule: PSym): PSym = localError(n.info, errGenerated, "module alias must be an identifier") elif n.sons[1].ident.id != realModule.name.id: # some misguided guy will write 'import abc.foo as foo' ... - result = createModuleAlias(realModule, n.sons[1].ident, n.sons[1].info) + result = createModuleAlias(realModule, n.sons[1].ident, realModule.info) proc myImportModule(c: PContext, n: PNode): PSym = var f = checkModuleName(n) diff --git a/tests/modules/tselfimport.nim b/tests/modules/tselfimport.nim index f20a40407..ddb3a5b09 100644 --- a/tests/modules/tselfimport.nim +++ b/tests/modules/tselfimport.nim @@ -1,8 +1,9 @@ discard """ file: "tselfimport.nim" - line: 6 + line: 7 errormsg: "A module cannot import itself" """ +import strutils as su # guard against regression import tselfimport #ERROR echo("Hello World") -- cgit 1.4.1-2-gfad0 From 2c5743db3eac0ecb19d30f7b3b43045a116dcbf4 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 22 Oct 2014 12:50:04 +0200 Subject: fixes #1029 --- compiler/importer.nim | 4 ++-- compiler/semexprs.nim | 10 ++++++---- tests/modules/texport.nim | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/compiler/importer.nim b/compiler/importer.nim index 58b5ef8d4..33ed7e055 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -173,7 +173,7 @@ proc evalImport(c: PContext, n: PNode): PNode = # ``addDecl`` needs to be done before ``importAllSymbols``! addDecl(c, m) # add symbol to symbol table of module importAllSymbolsExcept(c, m, emptySet) - importForwarded(c, m.ast, emptySet) + #importForwarded(c, m.ast, emptySet) proc evalFrom(c: PContext, n: PNode): PNode = result = n @@ -198,4 +198,4 @@ proc evalImportExcept*(c: PContext, n: PNode): PNode = let ident = lookups.considerQuotedIdent(n.sons[i]) exceptSet.incl(ident.id) importAllSymbolsExcept(c, m, exceptSet) - importForwarded(c, m.ast, exceptSet) + #importForwarded(c, m.ast, exceptSet) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 46e6f1ab3..58cef36f9 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1935,11 +1935,13 @@ proc semExport(c: PContext, n: PNode): PNode = while s != nil: if s.kind in ExportableSymKinds+{skModule}: x.add(newSymNode(s, a.info)) + strTableAdd(c.module.tab, s) s = nextOverloadIter(o, c, a) - if c.module.ast.isNil: - c.module.ast = newNodeI(nkStmtList, n.info) - assert c.module.ast.kind == nkStmtList - c.module.ast.add x + when false: + if c.module.ast.isNil: + c.module.ast = newNodeI(nkStmtList, n.info) + assert c.module.ast.kind == nkStmtList + c.module.ast.add x result = n proc setGenericParams(c: PContext, n: PNode) = diff --git a/tests/modules/texport.nim b/tests/modules/texport.nim index 99228dfce..9515f9060 100644 --- a/tests/modules/texport.nim +++ b/tests/modules/texport.nim @@ -4,6 +4,9 @@ discard """ import mexporta +# bug #1029: +from rawsockets import accept + # B.TMyObject has been imported implicitly here: var x: TMyObject echo($x, q(0), q"0") -- cgit 1.4.1-2-gfad0 From d72818e3a390a7e887e18568e82b26ba99214717 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 22 Oct 2014 13:42:31 +0200 Subject: updated news.txt --- web/news.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web/news.txt b/web/news.txt index acf193088..3d962172f 100644 --- a/web/news.txt +++ b/web/news.txt @@ -5,7 +5,7 @@ News 2014-10-19 Nimrod version 0.9.6 released ======================================== -**Note: 0.9.6 is the last release of Nimrod. The language has been renamed to +**Note: 0.9.6 is the last release of Nimrod. The language is being renamed to Nim. Nim slightly breaks compatibility.** This is a maintenance release. The upcoming 0.10.0 release has @@ -37,13 +37,20 @@ Changes affecting backwards compatibility will disappear soon! +Compiler improvements +--------------------- + +- Multi method dispatching performance has been improved by a factor of 10x for + pathological cases. + + Language Additions ------------------ -- This version introduces the new ``deprecated`` pragma statement that is used +- This version introduces the ``deprecated`` pragma statement that is used to handle the upcoming massive amount of symbol renames. -- ``spawn`` can now wrap proc that have a return value. It then returns a flow - variable of the wrapped return type. +- ``spawn`` can now wrap proc that has a return value. It then returns a data + flow variable of the wrapped return type. Library Additions -- cgit 1.4.1-2-gfad0