Comments (10)
Thanks for the detail, I'm able to replicate your error!
I couldn't replicate it before because I ran both lines at once, instead of each line individually.
This is a certainly a bug, not sure what the cause is though. Other team members might have a better idea.
from swift.
Are you running on Ubuntu 16.04 or 14.04?
I wasn't able to reproduce this on either platform. I tested both the 04-26
and 05-03
pre-built packages.
from swift.
It's Ubuntu 16.04.4 LTS. If I compile a simple program with String Interpolation, it finishes without any executable.
I ran this docker container https://groups.google.com/a/tensorflow.org/forum/#!topic/swift/ru0g4A29D8c and the kernel also keep running forever.
from swift.
Can you share the exact program you're compiling and the command you're using? Are you using a pre-built package, and if so which version?
from swift.
Oh my bad, the comipler for String Interpolaton actually works, only the REPL crashes.
from swift.
I'm assuming you're using the package from 04-26
, based on the /home/danielzheng
path in the error message.
I'm not able to replicate your bug on Ubuntu 16.04.4 LTS:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
$ usr/bin/swift
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44). Type :help for assistance.
1> let amount = 3
2. let count = "I have \(amount) apples."
amount: Int = 3
count: String = "I have 3 apples."
Can you please share as much info as possible about how you're invoking the REPL? It's difficult to debug otherwise.
from swift.
I downloaded the newer built 05-03 and extract and run from it.
Then I invoke the REPL the usual way as described in Usage.md:
usr/bin/swift -Iusr/lib/swift/clang/include
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44, Swift 2347c83692). Type :help for assistance.
1> let amount = 3
amount: Int = 3
2> let count = "I have \(amount) apples"
lldb: /home/swift-build/llvm/lib/IR/Value.cpp:404: void llvm::Value::doRAUW(llvm::Value *, bool): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
Stack dump:
0. Running pass 'Function Pass Manager' on module 'lldb_module'.
1. Running pass 'Swift ARC contraction' on function '@"$SSS19stringInterpolationS2Sd_tcfCTf4gd_n"'
[1] 13640 abort (core dumped) usr/bin/swift -Iusr/lib/swift/clang/include
It's still crashes when I only run usr/bin/swift
without the -I flag.
from swift.
I tried to test if this is a bug from upstream.
Our last merge from upstream was on 03-12.
Unfortunately, the oldest Ubuntu 16.04 snapshot currently available from https://swift.org/download is from 03-25: https://swift.org/builds/development/ubuntu1604/swift-DEVELOPMENT-SNAPSHOT-2018-03-25-a/swift-DEVELOPMENT-SNAPSHOT-2018-03-25-a-ubuntu16.04.tar.gz
.
I tried running it and ran into a different crash:
$ curl https://swift.org/builds/development/ubuntu1604/swift-DEVELOPMENT-SNAPSHOT-2018-03-25-a/swift-DEVELOPMENT-SNAPSHOT-2018-03-25-a-ubuntu16.04.tar.gz -o 03-25.tar.gz
# various output
$ tar xzf 03-25.tar.gz
$ swift-DEVELOPMENT-SNAPSHOT-2018-03-25-a-ubuntu16.04/usr/bin/swift
Welcome to Swift version 4.2-dev (LLVM 95345677bd, Clang 8320c34f23, Swift 82ea1dcd39). Type :help for assistance.
1> let amount = 3
amount: Int = 3
2> let count = "I have \(amount) apples"
count: String = {
_guts = {
_object = {
_object = <extracting data from value failed>
}
_otherBits = <extracting data from value failed>
}
}
error: Couldn't lookup symbols:
Swift.String.init(stringInterpolation: Swift.String...) -> Swift.String
protocol witness table for Swift.String : Swift.TextOutputStreamable in Swift
Swift._allocateUninitializedArray<A>(Builtin.Word) -> (Swift.Array<A>, Builtin.RawPointer)
type metadata for Swift.Int
Swift.String.init<A where A: Swift.CustomStringConvertible>(stringInterpolationSegment: A) -> Swift.String
type metadata for Swift.String
swift_release
swift_retain
Swift.String.init(_builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.String
protocol witness table for Swift.Int : Swift.CustomStringConvertible in Swift
protocol witness table for Swift.String : Swift.CustomStringConvertible in Swift
Swift.String.init<A where A: Swift.CustomStringConvertible, A: Swift.TextOutputStreamable>(stringInterpolationSegment: A) -> Swift.String
It's possible that the string interpolation bug will get magically fixed when we merge from upstream. It's also possible that the bug occurs because we hard-coded the REPL to run with optimizations (-O
), when normally it runs with -Onone
.
from swift.
@dan-zheng Also move this one?
from swift.
Moved to SR-7756.
from swift.
Related Issues (20)
- Close all open issues and pull requests since this repository has been moved
- Python linking in xcode HOT 5
- Internal error when `public`s are removed from the catch model HOT 3
- Configuring swift-format's line breaking rule
- Add build instructions to Readme
- Error building swift-format HOT 1
- Translation of Google Swift Style Guide
- Unexpected newline before opening brace for method calls with trailing closures
- The rule NoAccessLevelOnExtensionDeclaration doesn't work
- testEagerLoop() in crashers.swift crashers in TFLowerGraph.cpp, after supporting TF tensor receives HOT 1
- Use SILPrinter callback mechanism to annotate the printed SIL code HOT 2
- Bridge Python `numpy.ndarray` to `Array` and `Tensor` HOT 2
- [Ubuntu] `Python.import("numpy")` fails in the REPL HOT 5
- Non-data dependent code with side effects - should they sync? HOT 8
- Implement UseOnlySpaces HOT 1
- Implement UseTripleSlashForDocumentationComments HOT 1
- implement NeverUseForceTry HOT 1
- Implement NeverUseImplicitlyUnwrappedOptionals HOT 1
- Implement CyclomaticComplexityWarning.swift HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.